CentOS 6.5/6.6 安裝mysql 5.7
Step1: 檢測系統是否自帶安裝mysql
de ># yum list installed | grep mysql
de>
Step2: 刪除系統自帶的mysql及其依賴
命令:
de ># yum -y remove mysql-libs.x86_64
de>
de >注:用de> yum -y remove xxx【xxx是你第一步驟命令的輸出】,這個步驟不能省略,不然下面會出現一堆莫名其妙的問題;
Step3: 給CentOS新增rpm源,並且選擇較新的源
命令:
de ># wget dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm # yum localinstall mysql-community-release-el6-5.noarch.rpm # yum repolist all | grep mysql # yum-config-manager --disable mysql55-community # yum-config-manager --disable mysql56-community # yum-config-manager --enable mysql57-community-dmr # yum repolist enabled | grep mysql de>
de >注:如果de>yum-config-manager這個命令沒有,直接yum yum-*即可
Step4:安裝mysql 伺服器
命令:
de ># yum install mysql-community-server
de>
Step5: 啟動mysql
命令:
de ># service mysqld start
de>
Step6: 檢視mysql是否自啟動,並且設定開啟自啟動
命令:
de ># chkconfig --list | grep mysqld # chkconfig mysqld on de>
Step7: 獲取mysql初始密碼:
#######從mysql程式日誌中獲取root使用者的初始密碼:ra%yk7urCBIh
de style="box-sizing: border-box; padding: 0px; border-radius: 0px; overflow-wrap: normal; background-image: none; background-attachment: initial; background-color: initial; background-size: initial; background-origin: initial; background-clip: initial; background-; background-repeat: initial;" >
[root@typecodes ~]# grep "password" /var/log/mysqld.log 2016-02-03T10:42:17.272166Z 1 [Note] A temporary password is generated for root@localhost: ra%yk7urCBIh 2016-02-03T10:42:36.776875Z 2 [Note] Access denied for user 'root'@'localhost' (using password: NO) 2016-02-03T10:42:52.063138Z 3 [Note] Access denied for user 'root'@'localhost' (using password: NO) 2016-02-03T10:42:57.564373Z 4 [Note] Access denied for user 'root'@'localhost' (using password: NO) 2016-02-03T10:43:01.477007Z 5 [Note] Access denied for user 'root'@'localhost' (using password: NO) 2016-02-03T10:46:03.642008Z 6 [Note] Access denied for user 'root'@'localhost' (using password: NO) 2016-02-03T10:46:11.217889Z 7 [Note] Access denied for user 'root'@'localhost' (using password: NO) 2016-02-03T10:47:44.755199Z 0 [Note] Shutting down plugin 'validate_password' 2016-02-03T10:47:46.505844Z 0 [Note] Shutting down plugin 'sha256_password' 2016-02-03T10:47:46.505851Z 0 [Note] Shutting down plugin 'mysql_native_password'
Step8: mysql安全設定
命令:# mysql_secure_installation
step9:登陸mysql,建立使用者,資料庫等
參照:http://cyxinda.blog.163.com/blog/static/36596186201503162841301/
step10:
MySQL的配置檔案依然是de style="box-sizing: border-box; font-size: 12px; padding: 2px 4px; color: rgb(199, 37, 78); white-space: nowrap; border-radius: 2px; overflow: auto; background-color: rgb(249, 242, 244);" >/etc/my.cnfde>,其它安裝資訊可以通過de style="box-sizing: border-box; font-size: 12px; padding: 2px 4px; color: rgb(199, 37, 78); white-space: nowrap; border-radius: 2px; overflow: auto; background-color: rgb(249, 242, 244);" >mysql_configde>命令檢視。其中,動態庫檔案存放在de style="box-sizing: border-box; font-size: 12px; padding: 2px 4px; color: rgb(199, 37, 78); white-space: nowrap; border-radius: 2px; overflow: auto; background-color: rgb(249, 242, 244);" >/usr/lib64/mysqlde>目錄下。
調優mysql引數:http://cyxinda.blog.163.com/blog/static/365961862016066020391/
[root@master2 ~]# mysql_config
相關文章
- Linux平臺(CentOS 6.5) RPM包方式安裝 Mysql 5.7LinuxCentOSMySql
- CentOS 7 - 安裝MySQL 5.7CentOSMySql
- CentOS 7 安裝 MySQL 5.7CentOSMySql
- centos安裝mysql5.7CentOSMySql
- CentOS 6.5下安裝MySQL 5.5CentOSMySql
- Percona MySQL 5.7 Linux通用二進位制包安裝(CentOS 6.5)MySqlLinuxCentOS
- CentOS 6.5下快速安裝MySQL 5.7.17CentOSMySql
- CentOS 6.5安裝Oracle 11.2.0.4------CentOS 6.5安裝CentOSOracle
- CentOS7.3 安裝 MySQL5.7CentOSMySql
- CentOS7 安裝mysql5.7CentOSMySql
- mysql5.7安裝_centos7MySqlCentOS
- Centos6.6安裝教程CentOS
- centos6.5上安裝mysql 5.7.20CentOSMySql
- CentOS6.5上安裝MySQL5.6CentOSMySql
- centos7.2 mysql5.7安裝教程CentOSMySql
- CentOS7下yum安裝MySQL 5.7CentOSMySql
- CentOS7 yum安裝MySQL5.7CentOSMySql
- centos7.6 安裝配置 mysql5.7CentOSMySql
- MySQL5.7 在CentOS 下的安裝MySqlCentOS
- centos 6.5 安裝chromeCentOSChrome
- CentOS6.5下MySQL5.6的安裝CentOSMySql
- centos7安裝mysql5.7 使用yumCentOSMySql
- CentOS7利用docker安裝MySQL5.7CentOSDockerMySql
- CentOS 7 原始碼編譯安裝 Mysql 5.7CentOS原始碼編譯MySql
- 在centos7上安裝mysql5.7CentOSMySql
- Centos7下安裝配置MySQL5.7CentOSMySql
- CentOS6.5安裝pipCentOS
- CentOS6.5 安裝opensslCentOS
- CentOS6.5安裝ScrapyCentOS
- CentOS 6.5 tree命令安裝CentOS
- Centos6.5 Docker安裝CentOSDocker
- centos6.5安裝gitCentOSGit
- CentOS6.5安裝MongoDBCentOSMongoDB
- CentOS 6.5安裝Nginx (一)CentOSNginx
- CentOS6.5安裝RHBaseCentOS
- CentOS6.5安裝RHiveCentOSHive
- CentOS 6.5 安裝影像介面CentOS
- CentOS 6.5 原始碼編譯安裝 MySQL 5.5 5.6CentOS原始碼編譯MySql