I downloaded MAMP , I drive in the terminal:
./mysqladmin -u root - password "newpassword" and gives this error: error:
'Access denied for user 'root'@'localhost' (using password: NO)' What to do?
MySQL utilities allow you to set an account password using the --password parameter or its short form -p . In full form, if you do not specify a password, it is requested from you separately
./mysqladmin -u root --password You can specify a password on the command line, through =
./mysqladmin -u root --password=newpassword In the short form of the -p parameter, without specifying a password, the password will be requested immediately after the execution of the command
./mysqladmin -u root -p Or you can specify it immediately after the parameter by entering it without a space or additional characters.
./mysqladmin -u root -pnewpassword However, specifying a password on the command line is considered bad form, since the command remains in the logs, which in case of hacking can be used by an attacker to increase privileges. If the use of a password in a command is necessary, you can prefix the command with a space
$ ./mysqladmin -u root -pnewpassword In this case, it does not fall into the story. However, in practice, they often resort to the local configuration file of the user ~ / .my.cnf, in which they indicate their preferred login and password, setting access rights to it in such a way that only the owner can read it.
[client] user=root password=newpassword Source: https://ru.stackoverflow.com/questions/505072/
All Articles
mysqladmin, on a vskidku - but is a space really needed before thepassword? and is there exactly-password? can-p? - BOPOH