Advertisement
Guest User

Untitled

a guest
Jul 4th, 2017
520
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. [client]
  2. user=root
  3. password=somepassword
  4. ...
  5.  
  6. ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY
  7.  
  8. # ls -l /root/.mysqlpw
  9. -rw------- 1 root root 7 2013-08-19 13:24 /root/.mysqlpw
  10.  
  11. # mysql -u root -p`cat /root/.mysqlpw ` yourdatabase < databasedump.sql
  12.  
  13. # mysql -u root -p`cat /root/.mysqlpw ` yourdatabase
  14. Welcome to the MySQL monitor. Commands end with ; or g.
  15. Your MySQL connection id is 20460
  16. Server version: 5.1.63-0ubuntu0.10.04.1 (Ubuntu)
  17.  
  18. Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
  19.  
  20. Oracle is a registered trademark of Oracle Corporation and/or its
  21. affiliates. Other names may be trademarks of their respective
  22. owners.
  23.  
  24. Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
  25.  
  26. mysql> show databases;
  27. +--------------------+
  28. | Database |
  29. +--------------------+
  30. | information_schema |
  31. | mysql |
  32. | yourdatabase |
  33. +--------------------+
  34. 3 rows in set (0.00 sec)
  35.  
  36. mysql> show tables;
  37. ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement