Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ mysql_config_editor set --user=<user> --password --host=<host>
- Enter password:
- $ ls -la .mylogin.cnf
- -rw-------. 1 urmt urmt 136 Dec 19 11:01 .mylogin.cnf
- $ mysql_config_editor print --all
- [client]
- user = <user>
- password = *****
- host = <host>
- $ mysql <dbname>
- ERROR 1045 (28000): Access denied for user '<user>'@'<host>' (using password: NO)
- $ mysql -p <dbname>
- Enter password:
- Reading table information...
- ...
- mysql>
- $ export MYSQL_TEST_LOGIN_FILE=$HOME/mylogin.cnf
- $ mysql_config_editor set --login-path=mytest --host=127.0.0.1 --port=5622 --user=mytest --password
- Enter password:
- $ ls -l $MYSQL_TEST_LOGIN_FILE
- -rw------- 1 mysql mysql 288 Feb 27 14:25 mylogin.cnf
- $ mysql --no-defaults --login-path=mytest test
Add Comment
Please, Sign In to add comment