新聞中心
這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
Centos7.1部署mysql-5.6.34(筆記)-創(chuàng)新互聯(lián)
這里安裝我用的的是mysql二進制包,主要減少編譯安裝的時間,當然快的還有yum的安裝方式。
mysql個版本下載地址:http://mirrors.sohu.com/mysql/
1、解決相關依賴問題,否則初始化數(shù)據(jù)庫會出現(xiàn)錯誤
yum install -y perl-Module-Install.noarch libaio*2、解壓軟件包到/usr/local/src
tar xf mysql-5.6.34-linux-glibc2.5-x86_64.tar.gz -C /usr/local/src/3、設置mysql
cd /usr/local/src/mysql-5.6.34-linux-glibc2.5-x86 ln -sv /usr/local/src/mysql-5.6.34-linux-glibc2.5-x86_64 /usr/local/mysql cd /usr/local/mysql/#創(chuàng)建用戶給予權限
useradd mysql -s /sbin/nologin chown -R mysql.mysql ./* –R#創(chuàng)建mysql的數(shù)據(jù)目錄
mkdir /data/mysql && chown mysql.mysql /data/mysql –R#初始化mysql
/usr/local/mysql/scripts/mysql_install_db --user=mysql --datadir=/data/mysql --basedir=/usr/local/mysql/#拷貝mysql的啟動文件以及配置文件
cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql cp /usr/local/mysql/my.cnf /etc/my.cnf#設置mysql的環(huán)境變量
ln -sv /usr/local/mysql/bin/mysql /usr/bin/#最后啟動mysql即可
/etc/init.d/mysql restart#訪問mysql
[root@localhost ~]# /usr/local/mysql/bin/mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 6 Server version: 5.6.34 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>另外有需要云服務器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務器、裸金屬服務器、高防服務器、香港服務器、美國服務器、虛擬主機、免備案服務器”等云主機租用服務以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務可用性高、性價比高”等特點與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應用場景需求。
當前題目:Centos7.1部署mysql-5.6.34(筆記)-創(chuàng)新互聯(lián)
網(wǎng)站路徑:http://ef60e0e.cn/article/dogiee.html