CentOS_mysql8.0_错误

#参考资料

CSND:https://blog.csdn.net/y_server/article/details/78781177

博客园:http://www.cnblogs.com/testway/p/9289827.html

 

# support-files/mysql.server start 失败

ERROR! The server quit without updating PID file (/usr/local/mysql/data/VM_0_13_centos.pid).

//重启

shutdown -r

 

#本地连接数据库

Host '58.35.4.90' is not allowed to connect to this MySQL server.

//创建新用户,并授权

create user root2 identified by 'root2';

update user set host='%' where user='root2';

grant all privileges on *.* to 'root2'@'%';

 

SQLSTATE[HY000] [2054] Server sent charset unknown to the client.

//编码不对

vim /etc/my.cnf

[client]
default-character-set=utf8

[mysql]
default-character-set=utf8

[mysqld]
character-set-server = utf8

 

The server requested authentication method unknown to the client.

//验证机制不同

vim /etc/my.cnf

[mysqld]
default_authentication_plugin=mysql_native_password

 

 

 

Starting MySQL. ERROR! The server quit without updating PID file (/usr/local/mysql/data/VM_0_13_centos.pid).

//应该是权限问题

chown -R mysql:mysql /usr/local/mysql

 

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

//创建软连接

ln -s /usr/local/mysql/mysql.sock /tmp/mysql.sock

 

ERROR! MySQL server PID file could not be found!

//重启失败,关闭进程

killall mysqld

 

posted @ 2018-08-25 14:27  绿静風  阅读(450)  评论(0编辑  收藏  举报