I installed mySQL a while back but have now installed MAMP which also includes mySQL. I want to change the root user password in this new mySQL instance but I can't get this to work:
mysqladmin -u root -p --port=8889 --protocol=TCP password myNewPassword
(I have to use the port # and TCP protocol, otherwise it just tries to connect to my older mySQL instance)
The error I get is:
mysqladmin: [Warning] Using a password on the command line interface can be insecure. Warning: Since password will be sent to server in plain text, use ssl connection to ensure password safety. mysqladmin: unable to change password; error: 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '() IDENTIFIED BY 'myNewPassword'' at line 1'
What am I doing wrong?
From the MAMP FAQ:
/Applications/MAMP/Library/bin/mysqladmin -u root -p password <NEWPASSWORD>
Replace with the new password. You need to provide the existing root user password (e.g. ‘root’).
Afterwards, you also need to change the password for phpMyAdmin and other scripts which are used with MAMP. You can change the password for phpMyAdmin in the file /Applications/MAMP/bin/phpMyAdmin/config.inc.php.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With