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

Linux下mysql ERROR 1045,Mysql无法执行批处理

时间:2015-08-31 17:33:16      阅读:165      评论:0      收藏:0      [点我收藏+]

标签:mysql无法执行批处理

Linux下mysql ERROR 1045: Access denied for user: ‘root@localhost‘ (Using password: NO)

每次启用mysql都出现这个问题 然后我键入命令# mysql -pEnter password: Welcome to the MySQL monitor.  Commands endwith ; or \g.Your MySQL connection id is 35 to server version: 4.0.20-standard Type ‘help;‘ or ‘\h‘ for help. Type‘\c‘ to clear the buffer.

mysql> 这样才能用,不过想给mysql备份就不可以了,

键入#mysqldump database>databak.sql就又出现RROR 1045: Access denied for user: ‘root@localhost‘ (Using password: NO)怎么才能接着键入mysql就能使用,而且能对

mysql进行备份 

 解决办法:登陆mysql,然后执行下面语句:set password for ‘root‘@‘localhost‘ =password(‘‘);flush privileges;然后再重新登陆,就达

到你的要求了

本文出自 “天蓝蓝家园” 博客,谢绝转载!

Linux下mysql ERROR 1045,Mysql无法执行批处理

标签:mysql无法执行批处理

原文地址:http://perter.blog.51cto.com/1962646/1690145

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