Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mysql> select host,user,password from mysql.user where user = 'ans';
- +-----------+------+-------------------------------------------+
- | host | user | password |
- +-----------+------+-------------------------------------------+
- | localhost | ans | *40BA1B1CA7EE7B1B5FE4B2B754F74CD789DA6959 |
- | % | ans | |
- +-----------+------+-------------------------------------------+
- 2 rows in set (0.05 sec)
- $ mysql -uans -hvaliant
- Welcome to the MySQL monitor. Commands end with ; or g.
- Your MySQL connection id is 221
- Server version: 5.1.73 Source distribution
- mysql>
- mysql> s
- Current user: ans@valiant
- Connection: valiant via TCP/IP
- mysql> set password for 'ans'@'%' = password('foo');
- Query OK, 0 rows affected (0.00 sec)
- mysql> set password for 'ans'@'localhost' = password('foo');
- Query OK, 0 rows affected (0.00 sec)
- mysql> select host,user,password from mysql.user where user = 'ans';
- +-----------+------+-------------------------------------------+
- | host | user | password |
- +-----------+------+-------------------------------------------+
- | localhost | ans | *F3A2A51A9B0F2BE2468926B4132313728C250DBF |
- | % | ans | *F3A2A51A9B0F2BE2468926B4132313728C250DBF |
- +-----------+------+-------------------------------------------+
- 2 rows in set (0.00 sec)
- $ mysql -uans -pfoo
- Welcome to the MySQL monitor. Commands end with ; or g.
- Your MySQL connection id is 233
- Server version: 5.1.73 Source distribution
- mysql>
- $ mysql -uans -pfoo -hvaliant
- ERROR 1045 (28000): Access denied for user 'ans'@'valiant' (using password: YES)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement