Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mysqldump --databases mydata --tables small_table > /home/mysqllog.log
- [mysqldump]
- user=root
- password=mypassword#(of course not that)
- port=3306
- flush-logs
- quick
- single-transaction
- mysql> select host,user,authentication_string from user;
- +-----------+-----------+-------------------------------------------+
- | host | user | authentication_string |
- +-----------+-----------+-------------------------------------------+
- | localhost | root | *(ofcourse u cant see this MD5 string) |
- | localhost | mysql.sys | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE |
- | % | root | *(ofcourse u cant see this MD5 string) |
- +-----------+-----------+-------------------------------------------+
- 4 rows in set (0.00 sec)
- mysql> show grants;
- +---------------------------------------------------------------------+
- | Grants for root@localhost |
- +---------------------------------------------------------------------+
- | GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION |
- | GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION |
- +---------------------------------------------------------------------+
- 2 rows in set (0.00 sec)
- mysqldump: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect
- mysqldump -uroot -p --databases mydata --tables small_table > /home/mysqllog.log
- Enter password:
- Welcome to the MySQL monitor. Commands end with ; or g.
- Your MySQL connection id is 986
- Server version: 5.7.18-log MySQL Community Server (GPL)
- ......
Add Comment
Please, Sign In to add comment