centos6.5 安装 mysql 5.7

复制代码
shell> mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
 
shell> service mysqld restart
Stopping mysqld:                                           [  OK  ]
MySQL Daemon failed to start.
Starting mysqld:                                           [FAILED]
 
#日志中报错如下:
[ERROR] Fatal error: mysql.user table is damaged. Please run mysql_upgrade.
[ERROR] Aborting
 
#这种情况本人是在MySQL5.1到5.7版本升级时遇到的,升级到5.7后,数据库启动失败
#解决的办法就是重新初始化数据库
 
shell> rm -fr /var/lib/mysql
shell> mysqld --initialize --user=mysql
shell> service mysqld restart
Stopping mysqld:                                           [  OK  ]
Starting mysqld:                                           [  OK  ]

Mysql启动报错:InnoDB: Operating system error number 13 in a file operation.的解决方法

是系统问题,解决方案如下:

root@localhost mysql_data]# getenforce

Enforcing

root@localhost mysql_data\]# setenforce 0 \[root@localhost mysql_data\]# getenforce Permissive /etc/my.cnf 里面有mysql的日志 看系统版本号 cat /etc/redhat-release centos6.5安装mysql5.7 [CentOs6.5安装MySQL5.7 - 2023年-CSDN博客](https://blog.csdn.net/weixin_44090146/article/details/131555644 "CentOs6.5安装MySQL5.7 - 2023年-CSDN博客") 1. **rpm -qa \| grep mysql**# 检查是否安装过 MySQL 2. **rpm -qa \| grep mariadb** # 检查是否存在 mariadb 数据库(内置的 MySQL 数据库),有则强制删除 3. **rpm -e --nodeps mariadb-libs-5.5.68-1.el7.x86_64** # 强制删除 4. **rpm -e --nodeps mariadb-5.5.68-1.el7.x86_64**# 强制删除 下载到当前文件夹 **curl -O repo.mysql.com//mysql57-community-release-el7-11.noarch.rpm**

相关推荐
圈圈编码1 小时前
悲观锁和乐观锁
java·开发语言·sql·mysql
学习中的码虫1 小时前
MySQL提升
数据库·mysql
卡布奇诺-海晨3 小时前
MySQL的MVCC机制
数据库·mysql
秃头摸鱼侠5 小时前
MySQL查询语句(续)
数据库·mysql
睡觉待开机5 小时前
6. MySQL基本查询
数据库·mysql
weixin_470880266 小时前
MySQL体系架构解析(二):MySQL目录与启动配置全解析
数据库·mysql·面试·mysql体系架构·mysql bin目录
英英_7 小时前
MySQL 日志数据同步的详细教程
数据库·mysql
Paddy哥7 小时前
linux 安装mysql8.0;支持国产麒麟,统信uos系统
linux·mysql·麒麟·统信uos·统信
朝九晚五ฺ9 小时前
【MySQL基础】数据库的备份与还原
数据库·mysql·oracle
emo了小猫12 小时前
Mybatis #{} 和 ${}区别,使用场景,LIKE模糊查询避免SQL注入
数据库·sql·mysql·mybatis