mysql 1045错误
来源:互联网 发布:咨询师网络教育平台 编辑:程序博客网 时间:2024/05/22 01:41
mysql 1045错误
mysql 1045错误分两种
1, ERROR 1045 (28000): Access denied for user [email='root'@'localhost']'root'@'localhost'[/email] (using password YES)
这种错误主要是因为授权的原因
解决方案:select * from mysql.user;--看用戶權限有什么限制。 进行授权
2,ERROR 1045 (28000): Access denied for user [email='root'@'localhost']'root'@'localhost'[/email] (using password NO)
解决方案两种
一:
# /etc/init.d/mysql stop
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('newpassword') where USER='root';
mysql> FLUSH PRIVILEGES;
mysql> quit
# /etc/init.d/mysql restart
# mysql -uroot -p
Enter password: <输入新设的密码newpassword>
mysql>
二:
直接使用/etc/mysql/debian.cnf文件中[client]节提供的用户名和密码:
# mysql -udebian-sys-maint -p
Enter password: <输入[client]节的密码>
mysql> UPDATE user SET Password=PASSWORD('newpassword') where USER='root';
mysql> FLUSH PRIVILEGES;
mysql> quit
# mysql -uroot -p
Enter password: <输入新设的密码newpassword>
mysql>
1, ERROR 1045 (28000): Access denied for user [email='root'@'localhost']'root'@'localhost'[/email] (using password YES)
这种错误主要是因为授权的原因
解决方案:select * from mysql.user;--看用戶權限有什么限制。 进行授权
2,ERROR 1045 (28000): Access denied for user [email='root'@'localhost']'root'@'localhost'[/email] (using password NO)
解决方案两种
一:
# /etc/init.d/mysql stop
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('newpassword') where USER='root';
mysql> FLUSH PRIVILEGES;
mysql> quit
# /etc/init.d/mysql restart
# mysql -uroot -p
Enter password: <输入新设的密码newpassword>
mysql>
二:
直接使用/etc/mysql/debian.cnf文件中[client]节提供的用户名和密码:
# mysql -udebian-sys-maint -p
Enter password: <输入[client]节的密码>
mysql> UPDATE user SET Password=PASSWORD('newpassword') where USER='root';
mysql> FLUSH PRIVILEGES;
mysql> quit
# mysql -uroot -p
Enter password: <输入新设的密码newpassword>
mysql>
http://blog.163.com/caojuan_cju/blog/static/12611951220091171139231/
- Mysql的1045错误
- mysql 1045 错误解决方案
- mysql 出现1045错误
- mysql错误1045
- mysql 1045错误
- mysql 1045错误
- MySQL 之1045错误
- centos mysql 1045 错误
- mysql 1045 错误
- Mysql错误:Error Nr.1045
- mysql 1045错误的解决方法
- mysql 安装错误1045解决办法
- MySQL #1045错误完全解决方案
- Mysql Server 安装1045错误
- 安装MySQL出现1045错误
- discuz mysql 错误 (1045) notconnect
- mysql#1045错误如何消除
- mysql数据库1045错误处理
- jsdt 插件 httpclient模型发送消息至服务端
- 类模板中的函数模板的定义和调用(不是模板类中的普通成员函数)
- 关于页面元素的绝对定位和相对定位
- [Cocoa]深入浅出 Cocoa 之多线程 NSThread
- 歌手大奖赛
- mysql 1045错误
- adnroid 抓取通讯录信息 如果手机有备份联系人 只会抓取一组联系人
- android 自定义imageview实现 图片放大缩小
- Mybatis缓存机制
- 图解Git使用
- sina微博队列memcacheq 服务安装与原理
- 使用ibatis实现动态分页查询
- Eclipse格式化代码设置
- 集合:NSArray、NSMutableArray、NSDictionary、NSMutableDictionary、NSSet、NSMutableSet使用