0

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

iforce2d
  • 8,194
  • 3
  • 29
  • 40
  • I'm going to assume that you have some sort of special character in your password. `$` causes the most problems, so I'll use it as an example. Wrap the argument in single quotes thusly `'-ppa$$word'` and if that doesn't work start escaping things with \. – Sammitch Jan 04 '13 at 17:34
  • Thank you, wrapping the password part in single quotes made it work. – Mikael Johansson Jan 04 '13 at 21:15

0 Answers0