阿里云gpu服务器安装mysql

mysql版本5.7

安装mysql:

  1. sudo apt-get install mysql-server

  2. apt-get install mysql-client

  3.  sudo apt-get install libmysqlclient-dev

远程登录设置:

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

将bind-address = 127.0.0.1修改为bind-address = 0.0.0.0

重新启动并登陆mysql

sudo service mysql restart
2 mysql -uroot -p

修改权限:

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION;
FLUSH PRIVILEGES;

你可能感兴趣的:(mysql)