ubuntu 上mysql 设置远程访问

2021-10-13  本文已影响0人  取名好费劲

1. 安装mysql

apt-get install mysql-server

2. 设置远程访问

1. mysql -uroot -proot
2. use mysql;
3.  update user set authentication_string=password("root"),plugin='mysql_native_password',host='%' where user='root';
4. grant all privileges on *.* to 'root'@'%' identified by 'root' with grant option;
5. flush privileges

上一篇 下一篇

猜你喜欢

热点阅读