这里写自定义目录标题
1.安装mysql
–sudo apt-get update
sudo apt install mysql-server
2.检查mysql状态
–systemctl status mysql
3.设置mysql为远程访问
–use mysql;
–udate user set host=‘%’ where user=‘root’;
更改mysql密码
–alter user ‘root’@‘%’ identified with mysql_native_password by ‘123456’;
刷新权限
–flush privileges;
修改配置文件
–sudo vi /etc/mysql/mysql.conf.d/mysql.cnf
修改cnf中的文件如下
bind-address = 0.0.0.0
mysqlx-bind-address = 0.0.0.0