Welcome Guest | Login

mysql command giving "Access denied" error


Why do I get "Access Denied" error when trying the mysql command from command line?

mysql -u saokart_saokart -p=secret saokart_testdb
ERROR 1045 (28000): Access denied for user 'saokart_saokart'@'localhost' (using password: YES)

Mysql user name and password are not the actual values.

2008-03-05 04:29 PM

This is either due to syntax error or due to password mismatch.

The syntax you are using seems to be wrong. The correct syntax is  'mysql -u <user-name> -p <database-name> ' . This will prompt you for password .

If this option fails you 'll  have to recreate the user and have to assign the user to database.

2008-03-05 05:31 PM

Regards,
Rahul

Hello Guest! In order to post you must be an active client with us, please log in or sign up.