虚拟机Ubuntu 16.04安装 MySQL 主机配置访问

  sudo apt-get install mysql-server
  sudo apt-get install mysql-client

安装成功之后

进入配置文件

nano /etc/mysql/mysql.conf.d/mysqld.cnf

注释bing

进入mysql

grant all privileges on *.* to  root@"192.168.121.128" identified by "hett"

mysql> select user.host from user;

在主机中进行如下配置:

猜你喜欢

转载自www.linuxidc.com/Linux/2017-12/149855.htm