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

首頁 > 數據庫 > MySQL > 正文

CentOS7安裝調試Mysql數據庫的步驟詳解【實例】

2024-07-24 12:41:19
字體:
來源:轉載
供稿:網友

本實例要求下載并安裝調試Mysql數據庫。

第一步:下載Mysql數據庫安裝所需的全部軟件。

我已提前下載好數據庫軟件,直接在服務器下載即可,如下:

通過scp直接下載:

[root@agt20 ~]# scp root@192.168.122.10:/root/mysql* /root/

軟件如下圖:

[root@agt20 ~]# ls mysql-*mysql-5.7.17.tarmysql-community-client-5.7.17-1.el7.x86_64.rpmmysql-community-common-5.7.17-1.el7.x86_64.rpmmysql-community-devel-5.7.17-1.el7.x86_64.rpmmysql-community-embedded-5.7.17-1.el7.x86_64.rpmmysql-community-embedded-compat-5.7.17-1.el7.x86_64.rpmmysql-community-embedded-devel-5.7.17-1.el7.x86_64.rpmmysql-community-libs-5.7.17-1.el7.x86_64.rpmmysql-community-libs-compat-5.7.17-1.el7.x86_64.rpmmysql-community-minimal-debuginfo-5.7.17-1.el7.x86_64.rpmmysql-community-server-5.7.17-1.el7.x86_64.rpmmysql-community-test-5.7.17-1.el7.x86_64.rpm

第二步:通過yum進行安裝,起服務器并查看

[root@agt20 ~]# yum -y install mysql-*.rpm[root@agt20 ~]# systemctl restart mysqld[root@agt20 ~]# systemctl enable mysqld[root@agt20 ~]# systemctl status mysqld.service /u25cf mysqld.service - MySQL ServerLoaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)Active: active (running) since /u4e8c 2019-10-15 11:29:11 CST; 1min 15s agoDocs: man:mysqld(8)http://dev.mysql.com/doc/refman/en/using-systemd.htmlMain PID: 31584 (mysqld)CGroup: /system.slice/mysqld.service/u2514/u250031584 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid...10/u6708 15 11:28:42 agt20.tedu.cn systemd[1]: Starting MySQL Server...10/u6708 15 11:29:11 agt20.tedu.cn systemd[1]: Started MySQL Server.[root@agt20 ~]#

第三步:連接MySQL服務器,修改密碼;

1)查看初始密碼

[root@agt20 ~]# grep -i 'password' /var/log/mysqld.log 2019-10-15T03:28:55.200931Z 1 [Note] A temporary password is generated for root@localhost: r3qhDysMrM)

2)使用初始密碼連接mysql服務

[root@agt20 ~]# mysql -uroot -p'r3qhDysMrM)'mysql: [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 4Server version: 5.7.17Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '/h' for help. Type '/c' to clear the current input statement.mysql>

3)重置數據庫管理員roo本機登錄密碼

mysql> alter user root@localhost identified by 'Pwd@123...';Query OK, 0 rows affected (0.00 sec)

4)修改密碼策略

mysql> set global validate_password_policy=0;Query OK, 0 rows affected (0.01 sec)mysql> set global validate_password_length=6;Query OK, 0 rows affected (0.00 sec)mysql> alter user root@localhost identified by 'pwd@123';Query OK, 0 rows affected (0.00 sec)
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 盐亭县| 灵台县| 库车县| 嘉兴市| 乌审旗| 定陶县| 库车县| 巧家县| 筠连县| 黄陵县| 荔波县| 白城市| 荔波县| 五大连池市| 沧源| 彝良县| 得荣县| 历史| 锡林郭勒盟| 奈曼旗| 虎林市| 蕉岭县| 黎平县| 拉孜县| 城固县| 舞钢市| 拜泉县| 沁水县| 鄂托克旗| 南投县| 南雄市| 庆元县| 喜德县| 山阳县| 龙井市| 靖边县| 柞水县| 桂阳县| 安陆市| 桐柏县| 上杭县|