12月6日任務mysql
13.4 mysql用戶管理linux
13.5 經常使用sql語句sql
13.6 mysql數據庫備份恢復數據庫
13.4 mysql用戶管理ide
#操做過程。
mysql> grant all on *.* to 'user1'@'127.0.0.1' identified by '123456';
Query OK, 0 rows affected (0.01 sec).net
[root@zgxlinux-01 ~]# mysql -uuser1 -p123456
Warning: Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'user1'@'localhost' (using password: YES)
[root@zgxlinux-01 ~]# mysql -uuser1 -p123456 -h127.0.0.1
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.6.39 MySQL Community Server (GPL)get
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.input
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.it
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.io
mysql>
mysql> show grants for user1@'127.0.0.1'; #查看指定用戶的受權
+-----------------------------------------------------------------------------------------------------------------------+
| Grants for user1@127.0.0.1 |
+-----------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'user1'@'127.0.0.1' IDENTIFIED BY PASSWORD '*6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9' |
+-----------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
13.5 經常使用sql語句