1
votes

I am trying to copy an SQL database from the folder using this command:

sudo mysql -u root globe_bank ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) sudo mysql -u root -p globe_bank ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

I rang apple support and we changed the password of the root directory, they confirmed it was successful still getting this message. I have tried a few of the suggestions on similar threads, and mostly I get command not found.

When I type in mysql my connection ID is 19.

Any ideas or help is appreciated

1
I'm a little confused: why would Apple support know the root password? Are you sure you have the right password? You mentioned that you tried a few other things: what were they? - siride
Just try with mysql -u root and see if you can get into. Make sure you are logged in from root user. You can use sudo -i to switch to root user - Arun
mysql -u root command not found :( - Jane James
Apple help me reset the root password they didnt know it. - Jane James
If you are getting command not found, you are definitely not the root. It seems you are only able to access mysql from root user. Make sure you are root user first. - Arun

1 Answers

0
votes

I have faced the same issue on mysql Ver 15.1 on Amazon Linux 2 and the following worked for me:

Try entering the password on the same line.

I.e. instead of $mysql -u root -p, pressing Enter and then entering password after the prompt, do this:

$mysql -u root -p\<password>

Remember there is no "space" between -p and \<password>, I think you have got a space there!