Normally, a generic database password can be written in the user's home directory. MY.CNF then set chmod 600, which is generally more secure.
But if you do not want to give people know the user name and the actual password, but also want to use, you can use the MySQL own config edit.
Mysql_config_editorset--user=root--password
At this time, a user's home directory will appear with an encrypted later. MYLOGIN.CNF, Permissions 600
Direct view will find that the password is encrypted and called:
Mysql_config_editorprint--all
can see summary
Call MySQL directly to password-free login mysql_config_editor settings default server
If you need (2881064151) to set up multiple servers, you can use the--login-path parameter
Mysql_config_editorset--login-path=dev-slave--user=root--password--host=ip-of-server--port=3308
When linking, use the
MySQL--login-path=dev-mysql
This method does not say how safe, mainly after encryption, the naked eye is invisible.
Remember,. my.cnf and. Mylogin.cnf must chmod 600
You can use MySQL's own config edit