MySql Access denied for user 'root'@'localhost' (using password: YES)

雨燕双飞 提交于 2019-12-12 02:54:13

问题


I have a command line problem accessing mysql.

Entering /usr/syno/mysql/bin/mysql -uroot -pxxxx -hlocalhost mediawiki

gives me

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

If I, however, omit the password,

/usr/syno/mysql/bin/mysql -uroot -p -hlocalhost mediawiki 

I'm prompted for a password and may log in.

What do I do wrong in the first command line?

MySql version: 5.1.49

OS: Linux DiskStation 2.6.32.12 #2661 Mon Nov 12 23:09:58 CST 2012 armv5tel GNU/Linux (Synology NAS)

Mikael

来源:https://stackoverflow.com/questions/14161581/mysql-access-denied-for-user-rootlocalhost-using-password-yes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!