mysql_config_editor usage

时间:2023-03-09 09:17:42
mysql_config_editor usage
# mysql_config_eidtor is a tool to create a profile file $HOME/.mylogin.cnf, in which you can store login information (username, password, machine), so that you don't need to type password
# everytime you login mysql through command line /usr/local/mysql/bin/mysql_config_editor set --login-path=test --user=root --password --host=localhost # this will prompt you for password /usr/local/mysql/bin/mysql_config_editor print --all # print all content stored in $HOME/.mylogin.cnf /usr/local/mysql/bin/mysql_config_editor remove --login-path=test # remove config from $HOME/.mylogin.cnf # then you can use the following command line to login without having to enter password
/usr/local/mysql/bin/mysql --login-path=test