国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

centos7下安裝mysql5.7

2019-11-08 20:32:56
字體:
來源:轉載
供稿:網友

1.下載YUM庫

shell > wget http://dev.MySQL.com/get/mysql57-community-release-el7-7.noarch.rpm

2.安裝YUM庫

shell > yum localinstall -y mysql57-community-release-el7-7.noarch.rpm

3.安裝數據庫

shell > yum install -y mysql-community-server

4.啟動MySQL服務

shell > systemctl start mysqld.service

5.默認空密碼

shell > mysql -uroot -p

輸入密碼后提示:ERROR 1045 (28000): access denied for user 'root'@'localhost' (using passWord: NO)

6.開啟mysql安全模式(重要!這里跟百度出來其他開啟安全模式方法不一樣)

修改my.cnf,添加skip-grant-tables和skip-networking

輸入:vi /etc/my.cnf

[mysqld]

skip-grant-tables

skip-networking

重啟mysql  然后輸入: mysql -uroot mysql 此時即可登錄mysql 

然后:update mysql.user set authentication_string=password("root123") where user="root" and Host="localhost";

flush PRivileges;

  quit;

重啟mysql后添加遠程登錄用戶(登入Mysql):

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root123' WITH GRANT OPTION;

此時提示:The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement

意思是要修改密碼,原來忘記修改my.cnf 退出安全模式

輸入:vi /etc/my.cnf   刪除

skip-grant-tables

skip-networking

修改密碼時 如遇到提示: You must reset your password using ALTER USER statement before executing this statement.

執行下列操作:set global validate_password_policy=0;

set global validate_password_mixed_case_count=0;

set global validate_password_number_count=3;

set global validate_password_special_char_count=0;

set global validate_password_length=3;

然后更改密碼即可


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 江川县| 上犹县| 德格县| 镇安县| 东辽县| 玛曲县| 彭泽县| 长武县| 荃湾区| 灵武市| 白水县| 宁陵县| 澄迈县| 古蔺县| 汝南县| 罗甸县| 肥城市| 辉南县| 丰顺县| 灌南县| 阳春市| 兰州市| 中西区| 青田县| 利川市| 民和| 沧州市| 新郑市| 平和县| 临江市| 民丰县| 靖边县| 虞城县| 台北市| 新建县| 绵阳市| 夹江县| 竹北市| 瑞昌市| 天长市| 莱阳市|