ubuntu16.04下简单安装Mysql

ubuntu16.04下安装mysql

No1. Ubuntu下MySQL 安装

sudo apt-get install mysql-server mysql-client

记得root密码别忘了。

No2. 验证Mysql安装

sudo service mysql restart

No3. 设置Mysql远程IP访问

/etc/mysql/mysql.conf.d找到bind-address = 127.0.0.1,注释掉

No4. 设置字符集、排序规则等。

打开/etc/mysql/mysql.conf.d,在[mysqld]后添加

character-set-server=utf8

No5. 设置root远程访问

mysql -u root -p
->GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
->FLUSH PRIVILEGES;

重启mysql服务即可生效!

客户端安装的话 版本和ubuntu的对上就可以,我这里是5.7.24
windows链接在此:https://dev.mysql.com/downloads/file/?id=481160

在这里插入图片描述

点击这里即可下载windows客户端版本

猜你喜欢

转载自blog.csdn.net/weixin_43485502/article/details/85036593