安装mysql-server
sudo apt-get install mysql-server mysql-common mysql-client
更改mysql root账户认证模式
sudo mysql
select user, plugin from mysql.user; update mysql.user set authentication_string=PASSWORD('123456'), plugin='mysql_native_password' where user='root';
flush privileges;
exit
重启mysql-server
sudo systemctl restart mysql
以下可选操作,允许root远程登陆不安全
配置root远程登陆
grant all on *.* to root@'%' identified by '123456' with grant option;
flush privileges;
exit
修改侦听地址127.0.0.1为0.0.0.0
vi /etc/mysql/mysql.conf.d/mysqld.cnf
bind-address = 0.0.0.0
参考链接:https://www.cnblogs.com/ddif/p/9876502.html
文章同时也会在我的博客 0ne0ne.com同步更新。
网友评论