解决mysql 客户端连接问题
2016-05-07 00:04
302 查看
问题:在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
解决方法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数据库分区功能的使用教程
- MySQL知识的持续汇总
- MySQL数据库服务器的架设
- Mac 下 Mysql 重置密码
- mysql 聚簇索引 和聚簇索引 (二级索引)的 那些事
- MySQL数据库服务器的架设
- Mysql主从备份和SQL语句的备份
- mysql 命令
- mysql 多表查询
- mysqldump 导出个表结构或数据
- Ubuntu16.04 mysql基本命令
- 保存特殊字符到utf8编码的mysql数据库中
- MySQL存储过程循环添加数据
- 解决在ide数据库中用户名root 密码root 而在自己mysql上密码输入root连不上的问题
- mysql order by 优化 |order by 索引的应用
- mysql 5.7安装
- mysql存储过程调试学习总结
- mysql:on duplicate key update与replace into
- jsp+mysql实现增加,查看功能
- mysql 正斜杠 替换为 反斜杠