您好,登錄后才能下訂單哦!
下面講講關于centos 6.9 下rpm方式如何安裝mysql,文字的奧妙在于貼近主題相關。所以,閑話就不談了,我們直接看下文吧,相信看完centos 6.9 下rpm方式如何安裝mysql這篇文章你一定會有所受益。
在centos 6.9 上rpm安裝mysql
環境:
Linux:CentOS release 6.9 64bit
MySQL: mysq-5.7.18
1、在/home創建mysql目錄,下載如下四個軟件包
http://mirrors.sohu.com/mysql/MySQL-5.7/
wget http://mirrors.sohu.com/mysql/MySQL-5.7/mysql-community-client-5.7.18-1.el6.x86_64.rpm
wget http://mirrors.sohu.com/mysql/MySQL-5.7/mysql-community-common-5.7.18-1.el6.x86_64.rpm
wget http://mirrors.sohu.com/mysql/MySQL-5.7/mysql-community-libs-5.7.18-1.el6.x86_64.rpm
wget http://mirrors.sohu.com/mysql/MySQL-5.7/mysql-community-server-5.7.18-1.el6.x86_64.rpm
2、檢查mysql rpm相關的包是否安裝并去除
[root@centos-6 mysql]# rpm -qa | grep -i mysql
mysql-libs-5.1.73-8.el6_8.x86_64
[root@centos-6 mysql]# rpm -e mysql-libs-5.1.73-8.el6_8.x86_64
error: Failed dependencies:
libmysqlclient.so.16()(64bit) is needed by (installed) postfix-2:2.6.6-8.el6.x86_64
libmysqlclient.so.16(libmysqlclient_16)(64bit) is needed by (installed) postfix-2:2.6.6-8.el6.x86_64
mysql-libs is needed by (installed) postfix-2:2.6.6-8.el6.x86_64
[root@centos-6 mysql]#
將依賴包一并刪除
[root@centos-6 mysql]# yum remove -y mysql-libs
再次查詢是否刪除干凈
[root@centos-6 mysql]# rpm -qa | grep -i mysql
[root@centos-6 mysql]#
3、同時安裝這四個rpm包
rpm -ivh mysql-community-client-5.7.18-1.el6.x86_64.rpm mysql-community-common-5.7.18-1.el6.x86_64.rpm mysql-community-libs-5.7.18-1.el6.x86_64.rpm mysql-community-server-5.7.18-1.el6.x86_64.rpm
4、出現缺少依賴包解決方式
[root@centos-6 home]# rpm -ivh mysql-community-client-5.7.18-1.el6.x86_64.rpm mysql-community-common-5.7.18-1.el6.x86_64.rpm mysql-community-libs-5.7.18-1.el6.x86_64.rpm mysql-community-server-5.7.18-1.el6.x86_64.rpm
warning: mysql-community-client-5.7.18-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
error: Failed dependencies:
libnuma.so.1()(64bit) is needed by mysql-community-server-5.7.18-1.el6.x86_64
libnuma.so.1(libnuma_1.1)(64bit) is needed by mysql-community-server-5.7.18-1.el6.x86_64
libnuma.so.1(libnuma_1.2)(64bit) is needed by mysql-community-server-5.7.18-1.el6.x86_64
[root@centos-6 home]# yum install -y numactl
5、密碼獲取
第一次通過#grep "password" /var/log/mysqld.log 命令獲取MySQL的臨時密碼
用該密碼登錄到服務端后,必須馬上修改密碼,不然操作查詢時報錯誤
剛開始設置的密碼必須符合長度,且必須含有數字,小寫或大寫字母,特殊字符。
如果想設置簡單密碼,如下操作:
首先,修改validate_password_policy參數的值
mysql> set global validate_password_policy=0; #定義復雜度
mysql> set global validate_password_length=1; #定義長度 默認是8
mysql>set password for 'root'@'localhost'=password('123456'); #設置root密碼為123456
mysql> flush privileges; #刷新權限使配置生效
對于以上centos 6.9 下rpm方式如何安裝mysql相關內容,大家還有什么不明白的地方嗎?或者想要了解更多相關,可以繼續關注我們的行業資訊板塊。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。