Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mysql> GRANT ALL PRIVILEGES ON *.* TO 'testuser'@'127.0.0.1' IDENTIFIED BY 'password' WITH GRANT OPTION;
- Query OK, 0 rows affected (0.00 sec)
- mysql> FLUSH PRIVILEGES;
- Query OK, 0 rows affected (0.00 sec)
- mysql> select * from mysql.user where User='testuser' \G
- *************************** 1. row ***************************
- Host: 127.0.0.1
- User: testuser
- Password: *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19
- Select_priv: Y
- Insert_priv: Y
- Update_priv: Y
- Delete_priv: Y
- Create_priv: Y
- Drop_priv: Y
- Reload_priv: Y
- Shutdown_priv: Y
- Process_priv: Y
- File_priv: Y
- Grant_priv: Y
- References_priv: Y
- Index_priv: Y
- Alter_priv: Y
- Show_db_priv: Y
- Super_priv: Y
- Create_tmp_table_priv: Y
- Lock_tables_priv: Y
- Execute_priv: Y
- Repl_slave_priv: Y
- Repl_client_priv: Y
- Create_view_priv: Y
- Show_view_priv: Y
- Create_routine_priv: Y
- Alter_routine_priv: Y
- Create_user_priv: Y
- Event_priv: Y
- Trigger_priv: Y
- ssl_type:
- ssl_cipher:
- x509_issuer:
- x509_subject:
- max_questions: 0
- max_updates: 0
- max_connections: 0
- max_user_connections: 0
- 1 row in set (0.00 sec)
- mysql> quit
- Bye
- [root@db1 ~]# mysql -u testuser -ppassword -h 127.0.0.1
- Welcome to the MySQL monitor. Commands end with ; or \g.
- Your MySQL connection id is 20
- Server version: 5.1.61 Source distribution
- Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
- Oracle is a registered trademark of Oracle Corporation and/or its
- affiliates. Other names may be trademarks of their respective
- owners.
- Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
- mysql> quit
- Bye
- [root@db1 ~]# mysql -u testuser -h 127.0.0.1
- ERROR 1045 (28000): Access denied for user 'testuser'@'localhost' (using password: NO)
- [root@db1 ~]# mysql -u testuser
- Welcome to the MySQL monitor. Commands end with ; or \g.
- Your MySQL connection id is 22
- Server version: 5.1.61 Source distribution
- Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
- Oracle is a registered trademark of Oracle Corporation and/or its
- affiliates. Other names may be trademarks of their respective
- owners.
- Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
- mysql>
Add Comment
Please, Sign In to add comment