Guest User

Untitled

a guest
Mar 21st, 2018
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. $ mysql_config_editor set --user=<user> --password --host=<host>
  2. Enter password:
  3.  
  4. $ ls -la .mylogin.cnf
  5. -rw-------. 1 urmt urmt 136 Dec 19 11:01 .mylogin.cnf
  6. $ mysql_config_editor print --all
  7. [client]
  8. user = <user>
  9. password = *****
  10. host = <host>
  11.  
  12. $ mysql <dbname>
  13. ERROR 1045 (28000): Access denied for user '<user>'@'<host>' (using password: NO)
  14.  
  15. $ mysql -p <dbname>
  16. Enter password:
  17. Reading table information...
  18. ...
  19. mysql>
  20.  
  21. $ export MYSQL_TEST_LOGIN_FILE=$HOME/mylogin.cnf
  22.  
  23. $ mysql_config_editor set --login-path=mytest --host=127.0.0.1 --port=5622 --user=mytest --password
  24. Enter password:
  25.  
  26. $ ls -l $MYSQL_TEST_LOGIN_FILE
  27. -rw------- 1 mysql mysql 288 Feb 27 14:25 mylogin.cnf
  28.  
  29. $ mysql --no-defaults --login-path=mytest test
Add Comment
Please, Sign In to add comment