ubuntu 20.4 安装msyql+创建mysql用户
sudo apt-get update
sudo apt-get upgrate
sudo apt install mysql-server
设置运行远程访问
修改:sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf
用# 注释掉bind-address = 127.0.0.1
进入mysql创建用户
mysql -u root -p
CREATE USER 'test'@'%' IDENTIFIED BY '12345678';
GRANT ALL PRIVILEGES ON *.* TO 'test'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
退出mysql
systemctl restart mysql