程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> MYSQL數據庫 >> MySQL綜合教程 >> MySQL的登錄配置

MySQL的登錄配置

編輯:MySQL綜合教程


GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY 'abc';     mysql> select user, host, password from mysql.user;     +------+-----------+------------------+   | user | host      | password         |   +------+-----------+------------------+   | root | localhost | 7b49a39922703c30 |   | root | wengdev01 |                  |   | root | 127.0.0.1 |                  |   |      | localhost |                  |   |      | wengdev01 |                  |   | root | %         | 7b49a39922703c30 |   +------+-----------+------------------+   6 rows in set (0.00 sec)      DELETE FROM mysql.user WHERE Host <> '%' and user = 'root';     mysql> select user, host, password from mysql.user;   +------+------+------------------+   | user | host | password         |   +------+------+------------------+   | root | %    | 7b49a39922703c30 |   +------+------+------------------+   1 row in set (0.00 sec)       mysql> FLUSH PRIVILEGES;   Query OK, 0 rows affected (0.00 sec)     # 或者delete from mysql.user where password='' or user='';update mysql.user set host='%' where user='root';GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY 'abc';FLUSH PRIVILEGES;   新建一個用戶,並grant除administration之外的所有權限。 GRANT CREATE,DROP,GRANT OPTION,REFERENCES,EVENT,ALTER,DELETE,INDEX,INSERT,SELECT,UPDATE,LOCK TABLES,TRIGGER,CREATE TEMPORARY TABLES,CREATE VIEW,SHOW VIEW ON *.* TO cs@"%" IDENTIFIED BY 'abc';    
  作者 jqjyy

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved