本文主要為大家詳細介紹了centos6.4下mysql5.7.18安裝配置方法圖文教程,具有一定的參考價值,有興趣的小伙伴們可以參考一下,希望能幫助到大家。
centos6.4下安裝mysql5.7.18的具體步驟,分享給大家。
1、先檢查是否已經安裝過mysql,查找mysql相關軟體rpm包
#rpm -qa | grep mysql
2、將所有與mysql相關的東西刪除
#yum -y remove mysql-libs-5.1.66-2.el6_3.x86_64
#3、安裝依賴套件
##
#yum -y install make gcc-c++ cmake bison-devel ncurses-devellibaio libaio-devel
#
#groupadd mysql
#
#useradd mysql -g mysql
#tar xzvfmysql-5.7.19-linux-glibc2.12-x86_64.tar.gz
#mv mysql-5.7.19-linux-glibc2.12-x86_64 /usr/local/mysql
#mkdir /usr/local/mysql/data
#cd /usr/local
#chown -R mysql:mysql mysql/
#chmod -R 755 mysql/
#/usr/local/mysql/bin/mysqld --initialize --user=mysql --datadir=/usr/local/mysql/data --basedir=/usr/local/mysql#12、啟動mysql服務
#/usr/local/mysql/support-files/mysql.server start
#ln -s /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql #service mysql restart
#ln -s /usr/local/mysql/bin/mysql /usr/bin
#
#mysql -u root -p
##16、修改密碼為123456
msql>alter user 'root'@'localhost' identified by '123456'; mysql>use mysql; msyql>update user set user.Host='%' where user.User='root'; mysql>flush privileges; mysql>quit
#vi /usr/local/mysql/my.cnf [mysqld] port = 3306 sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
#iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT #iptables -L -n #service iptables save
以上是關於centos6.4下mysql5.7.18安裝設定方法圖文教學分享的詳細內容。更多資訊請關注PHP中文網其他相關文章!