标签:
一、工具下载
mysql下载传送门
SecureCRTSecureFX下载传送门
二、上传安装文件
三、查看上传的mysql安装文件
[root@localhost ~]# ls anaconda-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
[root@localhost ~]yum install -y perl-Module-Install.noarch
五、安装libaio
[root@localhost ~]yum install -y libaio libaio-devel
六、修改SELINUX的cfg
[root@localhost ~]vi /etc/selinux/config
修改(按i键后可修改)SELINUX=enforcing为SELINUX=disabled,存盘退出(按Esc键后输入:wq后回车)
七、重启系统
[root@localhost ~]reboot
八、安装server
[root@localhost ~]rpm -ivh MySQL-server-advanced-5.6.22-1.el7.x86_64.rpm
九、安装client
[root@localhost ~]rpm -ivh MySQL-client-advanced-5.6.22-1.el7.x86_64.rpm
十、启动mysql
[root@localhost ~]# service mysql start
Starting MySQL SUCCESS!
十一、设置root密码
[root@localhost ~]# service mysql stop [root@localhost ~]# mysqld_safe --user=mysql --skip-grant-tables --skip-networking & [root@localhost ~]# mysql -u root mysql mysql> UPDATE user SET Password=PASSWORD(‘123‘) where USER=‘root‘; mysql> FLUSH PRIVILEGES; mysql> quit [root@localhost ~]# service mysql start [root@localhost ~]# mysql -u root -p Enter password: 123
十二、启动mysql时报错
ERROR! MySQL server PID file could not be found!
kill掉所有出来的进程再启动mysql
[root@localhost ~]# 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*
[root@localhost ~]# kill 19162
[root@localhost ~]# kill 19280
[root@localhost ~]# kill 19678
标签:
原文地址:http://www.cnblogs.com/zqc5242519/p/4682045.html