Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- camel ~ # mysql --user=root --host=localhost --port=3306 '--password=********' -D mysql;
- Reading table information for completion of table and column names
- You can turn off this feature to get a quicker startup with -A
- Welcome to the MySQL monitor. Commands end with ; or \g.
- Your MySQL connection id is 19846
- Server version: 5.0.90-log Gentoo Linux mysql-5.0.90-r2
- Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
- mysql> select * from user where user like '%tok%';
- Empty set (0.00 sec)
- mysql> create user `pavel.tokarev`@`%` identified by '123456';
- Query OK, 0 rows affected (0.00 sec)
- mysql> grant usage on *.* to `pavel.tokarev`@`%`;
- Query OK, 0 rows affected (0.00 sec)
- mysql> grant select on ivr.* to `pavel.tokarev`@`%`;
- Query OK, 0 rows affected (0.00 sec)
- mysql> show grants for `p.tokarev`@`%`;
- ERROR 1141 (42000): There is no such grant defined for user 'p.tokarev' on host '%'
- mysql> show grants for `pavel.tokarev`@`%`;
- +--------------------------------------------------------------------------------------------------------------+
- | Grants for pavel.tokarev@% |
- +--------------------------------------------------------------------------------------------------------------+
- | GRANT USAGE ON *.* TO 'pavel.tokarev'@'%' IDENTIFIED BY PASSWORD '*6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9' |
- | GRANT SELECT ON "ivr".* TO 'pavel.tokarev'@'%' |
- +--------------------------------------------------------------------------------------------------------------+
- 2 rows in set (0.00 sec)
- mysql> flush privileges;
- Query OK, 0 rows affected (0.00 sec)
- mysql> Bye
- camel ~ # mysql --user=pavel.tokarev --host=localhost --port=3306 --password=123456 -D ivr;
- ERROR 1045 (28000): Access denied for user 'pavel.tokarev'@'localhost' (using password: YES)
Add Comment
Please, Sign In to add comment