安装采用rpm安装 参考链接中的选择对应版本下载解压即可
https://dev.
mysql.com/downloads/mysql/
相关安装包 只需要这四个即可按下面顺序执行 亲测可用
下载连接: 文件过大上传不了 根据上面的下载连接和参考连接自己下载吧
包冲突 安装不上
yum -y remove mysql-libs-*
service mysqld start //启动
# service mysqld stop //停止
# service mysqld status //查看当前mysql服务的状态
1.参考链接
2.假如设置完成之后忘记密码 可用root链接执行
mysqld_safe --skip-grant-tables
输入
mysql
进入
进入mysql系统数据库:
mysql>
use mysql;
修改密码(注意对应密码的字段)
update user set password=password('123456') where user="root";
或者直接修改远程链接的密码
mysql>
grant all privileges on *.* to 'root'@'%' identified by '123456';
3.如果远程链接连不上 关闭防火墙试试
开启: service iptables start
关闭: service iptables stop
4.防火墙添加3306端口
vi /etc/sysconfig/iptables
5.错误描述“1067”如果安装版本是5.7以上可能有导入失败(因为字段格式问题)
可以直接修改my.cnf文件
vim /etc/my.cnf
在[mysqld]下面添加如下列:
sql_mode=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
完成之后 重启mysql服务