加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

Linux mysql服务器无法启动或重启

发布时间:2020-12-14 02:33:58 所属栏目:Linux 来源:网络整理
导读:介绍 我在我的linux机器上运行MariaDB和Apache,今天我遇到了一些问题. 我通过SSH连接到服务器,这是我面临的一些问题.我完全不知道我在这里做什么. 我在做什么 第1步:mysql -u USERNAME -p ERROR 2002 (HY000): Can’t connect to local MySQL server throug
介绍

我在我的linux机器上运行MariaDB和Apache,今天我遇到了一些问题.

我通过SSH连接到服务器,这是我面临的一些问题.我完全不知道我在这里做什么.

我在做什么

第1步:mysql -u USERNAME -p

ERROR 2002 (HY000): Can’t connect to local MySQL server through socket
‘/var/run/mysqld/mysqld.sock’ (2 “No such file or directory”)

好的,所以我想,让我们尝试停止mysql服务

第2步:sudo服务mysql停止

好的,没有错误,所以重启服务

第3步:sudo服务mysql重启

Job for mysql.service failed. See “systemctl status mysql.service” and
“journalctl -xe” for details.

好的,所以我最好运行这两个命令,然后我得到的东西

第4步:状态mysql.service

嗯..好吧让我们尝试另一个

第5步:journalctl -xe

No journal files were found.

好的,我在这里迷路了..

MySQL错误日志

150824 14:42:58 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
150824 14:42:58 [Note] /usr/sbin/mysqld (mysqld 10.0.20-MariaDB-0ubuntu0.15.04.1) starting as process 22637 ...
150824 14:42:58 [ERROR] mysqld: File '/var/lib/mysql/aria_log_control' not found (Errcode: 13 "Permission denied")
150824 14:42:58 [ERROR] mysqld: Got error 'Can't open file' when trying to use aria control file '/var/lib/mysql/aria_log_control'
150824 14:42:58 [ERROR] Plugin 'Aria' init function returned error.
150824 14:42:58 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
150824 14:42:58 [Note] InnoDB: Using mutexes to ref count buffer pool pages
150824 14:42:58 [Note] InnoDB: The InnoDB memory heap is disabled
150824 14:42:58 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
150824 14:42:58 [Note] InnoDB: Memory barrier is not used
150824 14:42:58 [Note] InnoDB: Compressed tables use zlib 1.2.8
150824 14:42:58 [Note] InnoDB: Using Linux native AIO
150824 14:42:58 [Note] InnoDB: Using CPU crc32 instructions
150824 14:42:58 [Note] InnoDB: Initializing buffer pool,size = 128.0M
150824 14:42:58 [Note] InnoDB: Completed initialization of buffer pool
150824 14:42:58 [ERROR] InnoDB: ./ibdata1 can't be opened in read-write mode
150824 14:42:58 [ERROR] InnoDB: The system tablespace must be writable!
150824 14:42:58 [ERROR] Plugin 'InnoDB' init function returned error.
150824 14:42:58 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
150824 14:42:58 [Note] Plugin 'FEEDBACK' is disabled.
150824 14:42:58 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
150824 14:42:58 [ERROR] Unknown/unsupported storage engine: InnoDB
150824 14:42:58 [ERROR] Aborting

150824 14:42:58 [Note] /usr/sbin/mysqld: Shutdown complete

150824 14:42:58 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

磁盘空间的问题

它看起来不像磁盘空间是一个问题

解决方法

这就是它没有开始的原因:
150824 14:42:58 [ERROR] mysqld: File '/var/lib/mysql/aria_log_control' not found (Errcode: 13 "Permission denied")
150824 14:42:58 [ERROR] mysqld: Got error 'Can't open file' when trying to use aria control file '/var/lib/mysql/aria_log_control'

仔细检查/ var / lib / mysql的权限.另外,请检查系统日志以查看SE-Linux或Apparmor是否在干扰.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读