安装mysql

mark

问题1:windows用syslog连接本地mysql数据库,提示 plugin caching_sha2_password

mark

解决方案:

ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123';

mark

问题2.Host is not allowed to connect to this MySQL server

使用远程连接mysql的时候碰到这样的错误:

Host is not allowed to connect to this MySQL server。

简单的解决方式如下:

(1)修改表。可能是你的帐号不允许从远程登陆,只能在localhost。这个时候只要在localhost的那台电脑,登入mysql后,更改 "mysql" 数据库里的 "user" 表里的 "host" 项,从"localhost"改称"%"

mysql -u root -p

按照提示输入密码

mysql>use mysql;

mysql>update user set host = '%' where user = 'root';

(2)修改完后执行如下SQL命令

flush privileges