mysqldump: [Warning] Using a password on the command line interface can be insecure.
I used to use itmysqldump export, why can't I use it now?It seems that the mysql 5.6 version cannot be used, and the old version can be used!
I found the reason in the official website document, you can click here to see: http://dev.mysql.com/doc/refman/5.1/en/password-security-user.html
MySQL users should use the following guidelines to keep passwords secure.
When you run a client program to connect to the MySQL server, it is inadvisable to specify your password in a way that exposes it to discovery by other users. The methods you can use to specify your password when you run client programs are listed here, along with an assessment of the risks of each method. In short, the safest methods are to have the client program prompt for the password or to specify the password in a properly protected option file.
The English is a bit bad, but I roughly understand the meaning, and the translation is to the effect that if you want to use the password on the command line, you can enter the password in the prompt input after executing the command, or specify the password in the specified security file. Which one is a secure file? The documentation gives an answer to this:
Store your password in an option file. For example, on Unix, you can list your password in the [client] section of the .my.cnf file in your home directory。
Solution:
We found the my.ini file in the C:\ProgramData\MySQL\MySQL Server 5.7 file directory, and added the following configuration at the bottom:
Then, execute the export command, here I export mydb as an example:
Success!
|