標籤:
一、工具下載
mysql下載傳送門
SecureCRTSecureFX下載傳送門
二、上傳安裝檔案
三、查看上傳的mysql安裝檔案
[[email protected] ~]# lsanaconda-ks.cfg MySQL-client-advanced-5.6.22-1.el7.x86_64.rpm MySQL-server-advanced-5.6.22-1.el7.x86_64.rpm 公用 模板 視頻 圖片 文檔 下載 音樂 案頭
四、安裝perl
[[email protected] ~]yum install -y perl-Module-Install.noarch
五、安裝libaio
[[email protected] ~]yum install -y libaio libaio-devel
六、修改SELINUX的cfg
[[email protected] ~]vi /etc/selinux/config
修改(按i鍵後可修改)SELINUX=enforcing為SELINUX=disabled,存檔退出(按Esc鍵後輸入:wq後斷行符號)
七、重啟系統
[[email protected] ~]reboot
八、安裝server
[[email protected] ~]rpm -ivh MySQL-server-advanced-5.6.22-1.el7.x86_64.rpm
九、安裝client
[[email protected] ~]rpm -ivh MySQL-client-advanced-5.6.22-1.el7.x86_64.rpm
十、啟動mysql
[[email protected] ~]# service mysql startStarting MySQL SUCCESS!
十一、設定root密碼
[[email protected] ~]# service mysql stop [[email protected] ~]# mysqld_safe --user=mysql --skip-grant-tables --skip-networking & [[email protected] ~]# mysql -u root mysql mysql> UPDATE user SET Password=PASSWORD(‘123‘) where USER=‘root‘; mysql> FLUSH PRIVILEGES; mysql> quit [[email protected] ~]# service mysql start[[email protected] ~]# mysql -u root -p Enter password: 123
十二、啟動mysql時報錯
ERROR! MySQL server PID file could not be found!
kill掉所有出來的進程再啟動mysql
[[email protected] ~]# ps aux |grep mysq*
root 19162 0.0 0.0 113252 1600 pts/1 S 09:24 0:00 /bin/sh /usr/bin/mysqld_safe --user=mysql --skip-grant-tables --skip-networking
mysql 19280 0.1 5.7 1038812 456172 pts/1 Sl 09:24 0:03 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --skip-grant-tables --skip-networking --log-error=/var/lib/mysql/localhost.err --pid-file=/var/lib/mysql/localhost.pid
root 19678 0.0 0.0 112656 980 pts/1 S+ 09:55 0:00 grep --color=auto mysq*
[[email protected] ~]# kill 19162
[[email protected] ~]# kill 19280
[[email protected] ~]# kill 19678
[Linux]Centos7下mysql小白安裝教程