一、工具下载
mysql下载传送门
SecureCRTSecureFX下载传送门
二、上传安装文件
三、查看上传的mysql安装文件
[[email protected] ~]# 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
[[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 start Starting 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-networkingmysql 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.pidroot 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
时间: 2024-10-07 03:48:10