CentOS7安裝調(diào)試Mysql數(shù)據(jù)庫-創(chuàng)新互聯(lián)

   本實(shí)例要求下載并安裝調(diào)試Mysql數(shù)據(jù)庫。

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

我已提前下載好數(shù)據(jù)庫軟件,直接在服務(wù)器下載即可,如下:
通過scp直接下載:
[root@agt20 ~]# scp root@192.168.122.10:/root/mysql* /root/

創(chuàng)新互聯(lián)建站自2013年創(chuàng)立以來,是專業(yè)互聯(lián)網(wǎng)技術(shù)服務(wù)公司,擁有項(xiàng)目網(wǎng)站設(shè)計(jì)、成都網(wǎng)站建設(shè)網(wǎng)站策劃,項(xiàng)目實(shí)施與項(xiàng)目整合能力。我們以讓每一個夢想脫穎而出為使命,1280元沾化做網(wǎng)站,已為上家服務(wù),為沾化各地企業(yè)和個人服務(wù),聯(lián)系電話:18982081108

軟件如下圖:
[root@agt20 ~]# ls mysql-*
mysql-5.7.17.tar
mysql-community-client-5.7.17-1.el7.x86_64.rpm
mysql-community-common-5.7.17-1.el7.x86_64.rpm
mysql-community-devel-5.7.17-1.el7.x86_64.rpm
mysql-community-embedded-5.7.17-1.el7.x86_64.rpm
mysql-community-embedded-compat-5.7.17-1.el7.x86_64.rpm
mysql-community-embedded-devel-5.7.17-1.el7.x86_64.rpm
mysql-community-libs-5.7.17-1.el7.x86_64.rpm
mysql-community-libs-compat-5.7.17-1.el7.x86_64.rpm
mysql-community-minimal-debuginfo-5.7.17-1.el7.x86_64.rpm
mysql-community-server-5.7.17-1.el7.x86_64.rpm
mysql-community-test-5.7.17-1.el7.x86_64.rpm

第二步:通過yum進(jìn)行安裝,起服務(wù)器并查看

[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 Server
Loaded: 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 ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Main 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服務(wù)器,修改密碼;

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服務(wù)
[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 4
Server version: 5.7.17

Copyright (c) 2000, 2016, 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>
3)重置數(shù)據(jù)庫管理員roo本機(jī)登錄密碼
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)
5)使用修改后的密碼登錄
[root@agt20 ~]# mysql -uroot -ppwd@123
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 5
Server version: 5.7.17 MySQL Community Server (GPL)

Copyright (c) 2000, 2016, 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>

至此Mysql數(shù)據(jù)庫安裝調(diào)試完成?。。?!
    。
    。
    。
    。
    。

另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價比高”等特點(diǎn)與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。

新聞標(biāo)題:CentOS7安裝調(diào)試Mysql數(shù)據(jù)庫-創(chuàng)新互聯(lián)
網(wǎng)站地址:http://muchs.cn/article30/cdsipo.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供App開發(fā)外貿(mào)建站、定制網(wǎng)站、商城網(wǎng)站、網(wǎng)站策劃網(wǎng)站維護(hù)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

成都定制網(wǎng)站建設(shè)