ubuntu 18.04 安装 mysql server 5.7
【安装】
# apt install mysql-server
【启动】
#service mysql start
注意:
问题:
发生 No directory, logging in with HOME=/ 提示
解决方法:
#usermod -d /var/lib/mysql/ mysql
【新增用户并赋权】
mysql>create user garfield identified by '******';
mysql>grant all privileges on *.* to garfield@'%' identified by '******';
mysql>flush privileges;
【MySQL Workbench】
问题:
无法连接,报错:reading initial communication packet
解决办法:
修改 /etc/mysql/mysql.conf.d/mysqld.cnf , 注解 bind-address = 127.0.0.1 --> # bind-address = 127.0.0.1

浙公网安备 33010602011771号