Linux學習 (3) 安裝mysql Windows Azure Platform 系列文章目錄

  《Windows Azure Platform 系列文章目錄

 

  

#UNINSTALL MYSQL PACKAGES
yum remove mysql mysql-server


#ROMOVE MYSQL DIRECTORY
mv /var/lib/mysql /var/lib/mysql_bkup


Installing mysql 5.7 on centos 6

1. download yum repo
    wget http://dev.mysql.com/get/mysql57-community-release-el6-7.noarch.rpm

2. install yum repo
    yum -y localinstall mysql57-community-release-el6-7.noarch.rpm

3. verify yum repo
    yum repolist enabled | grep "mysql.*-community.*"

3a. to enable/disable a particular release
# yum-config-manager --disable mysql57-community
# yum-config-manager --enable mysql56-community


4. install 
    yum -y install mysql-community-server
    service mysqld start
    service mysqld status
    mysql --version


5. securing the installation
    grep 'temporary password' /var/log/mysqld.log
    mysql_secure_installation --> follow the prompts
        remove anonymouse users
        disallow root remote login

6. Login mysql -u root -p
7.reset default password
set password for root@localhost = password('123');


8. 檢查MySQL是否開機自動啓動
chkconfig --list | grep mysqld

9. 設置MySQL開啓自動啓動
  
chkconfig mysqld on

  
Useful links:
http://dev.mysql.com/doc/refman/5.7/en/linux-installation-yum-repo.html
http://www.tecmint.com/install-latest-mysql-on-rhel-centos-and-fedora/

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章