Stay Hungry, Stay Foolish

Host '***' is not allowed to connect to this MySQL server"

首先登录账号:

$mysql -uroot -p
mysql>select host from mysql.user where user='root';
#查看mysql库中的user表的host值(即可进行连接访问的主机/IP名称)
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '<root-password>' WITH GRANT OPTION;
# 允许所有人以'<root-password>'这个密码访问数据库 
#最后不要忘记
mysql> flush privileges;

可以把‘%’替换成IP地址,以允许指定地址登录。

喜欢 (0)
取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦


Warning: Use of undefined constant PRC - assumed 'PRC' (this will throw an Error in a future version of PHP) in C:\inetpub\wordpress\wp-content\themes\XHBlog\comments.php on line 17
发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址