码迷,mamicode.com
首页 > 数据库 > 详细

解决mysql 客户端连接问题

时间:2016-05-07 01:04:18      阅读:226      评论:0      收藏:0      [点我收藏+]

标签:

    问题:在linux 上安装了mysql服务端,使用客户端连接时报错信息为:ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES) 
    解决方法1:
        1.登录mysql: mysql -uroot -proot
        2.授权:GRANT ALL PRIVILEGES ON *.* TO ‘myuser‘@‘%‘ IDENTIFIED BY ‘mypassword‘ WITH GRANT OPTION;
        3.刷新权限:FLUSH PRIVILEGES;
        4.退出:EXIT
 
        解决方法2:
        1. 登录mysql: mysql -uroot -proot
        2. 选择mysql数据库:use mysql;
        3. 修改访问权限:update user set host = ‘%‘ where user = ‘root‘;
        4. 刷新权限:FLUSH PRIVILEGES;
        5. 退出:EXIT

 

解决mysql 客户端连接问题

标签:

原文地址:http://www.cnblogs.com/lsjlove/p/5467533.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!