mysql之 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
问题描述:启动MySQL后,出现连接不上,报 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
[root@mysql01 ~]# service mysql start
Starting MySQL [ OK ]
[root@mysql01 ~]# mysql -uroot -poracle
Warning: Using a password on the command line interface can be insecure.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@mysql01 ~]# ll /var/lib/mysql/mysql.sock
ls: cannot access /var/lib/mysql/mysql.sock: No such file or directory
说明:
mysqld.sock是mysql启动以后自动生成的文件,关闭MySQL服务后,这个文件又会被删除。如果MySQL启动异常,就有可能不生成这个文件,登录的时候就会出现你这个错误。
[root@mysql01 ~]# cd /var/lib/mysql
[root@mysql01 mysql]# ls
auto.cnf ib_logfile0 mysql01.err RPM_UPGRADE_MARKER-LAST
binarylog ib_logfile1 performance_schema test
ibdata1 mysql RPM_UPGRADE_HISTORY
[root@mysql01 mysql]# vi mysql01.err
错误日志报错如下:
2017-06-04 04:08:47 2835
2017-06-04 04:08:47 2835 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
分析:
1、磁盘空间目录不足
2、ibdata1 文件被其他的进程占用
3、 等
解决过程:
1、 -- 查看磁盘空间情况
[root@mysql01 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 35G 7.8G 26G 24% /
tmpfs 699M 72K 699M 1% /dev/shm
/dev/sda1 2.9G 4.5M 2.7G 1% /tmp
2、 --InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
已经指出其他的线程启动已经在运行无法再次创建相关的读文件进程的权限,也就是说,现有的ibddata文件已经有人读取了,无法再次启动!
-- 查看系统 mysql 相关进程
[root@mysql01 ~]# ps aux |grep mysql*
root 1742 0.0 0.0 108336 552 ? S 03:59 0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/mysql01.pid
mysql 1930 0.2 37.8 1170956 541948 ? Sl 03:59 0:03 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/mysql01.err --pid-file=/var/lib/mysql/mysql01.pid --port=3306
root 3117 0.0 0.0 103312 876 pts/2 S+ 04:29 0:00 grep mysql*
-- kill -9 杀掉
[root@mysql01 ~]# kill -9 1930
[root@mysql01 ~]# ps aux |grep mysql*
root 3186 0.0 0.0 103308 852 pts/2 S+ 04:29 0:00 grep mysql*
-- 启动
[root@mysql01 ~]# service mysql start
Starting MySQL.. [ OK ]
[root@mysql01 ~]# mysql -uroot -poracle
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
说明:恢复正常
mysql之 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11的更多相关文章
- 从ext4将mysql数据目录移动至lustre出现(InnoDB: Unable to lock ./ibdata1, error: 38.)
因为数据目录过大,因此我把目录从本地移到了共享存储中.在修改了/etc/my.cnf和/etc/init.d/mysqld之后发现数据库可以运行,但启动速度很慢 原因是原文件系统是ext4,而目标文件 ...
- mysql_install_db出错,Unable to lock /usr/local/mysql/var/ibdata1, error: 11
今天,在一台旧机器上编译一个新的Mysql,install时出了错: /usr/local/mysql_5615/scripts/mysql_install_db --user=mysql --bas ...
- InnoDB: auto-extending data file ./ibdata1 is of a different size 640 pages (rounded down to MB) than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!
问题描述: centos 安装MySQL $yum install mysql-server 安装之后执行命令mysql 报错: 查看mysql的启动日志: [ERROR] InnoDB: auto- ...
- [ERROR] InnoDB: ibdata1 different size (rounded down to MB)
启动mysql实例报错,查看 error log ## 错误信息2018-08-31T10:38:36.945081Z 0 [ERROR] InnoDB: The Auto-extending inn ...
- XAMPP 启动mysql报错 InnoDB: Error: could not open single-table tablespace file……
昨天安装了最新版本XAMPP for Windows 1.8.3. 今天早上打开XAMPP双击mysql Start按钮报错,如下(部分截取): 2013-09-17 10:12:02 9012 [E ...
- elasticsearch报错[WARN ][bootstrap ] Unable to lock JVM Memory: error=12,reason=Cannot allocate memory,解决
早上在服务器上安装elasticsearch集群,在其中的一台上面安装好elasticsearch之后安装了一些插件,其中一个插件是marvel,结果可能是新版本不支持这个插件,就没有安装成功,也就索 ...
- MySQL · 引擎特性 · InnoDB index lock前世今生
http://mysql.taobao.org/monthly/2015/07/05/ MySQL · 引擎特性 · InnoDB index lock前世今生 前言 InnoDB并发过程中使用两类锁 ...
- 《mysql技术内幕 InnoDB存储引擎(第二版)》阅读笔记
一.mysql架构 mysql是一个单进程多线程架构的数据库. 二.存储引擎 InnoDB: 支持事务 行锁 读操作无锁 4种隔离级别,默认为repeatable 自适应hash索引 每张表的存储都是 ...
- Mysql技术内幕——InnoDB存储引擎
Mysql技术内幕——InnoDB存储引擎 http://jingyan.baidu.com/article/fedf07377c493f35ac89770c.html 一.mysql体系结构和存储引 ...
随机推荐
- Java中ArrayList和LinkedList区别、ArrayList和Vector的区别
一般大家都知道ArrayList和LinkedList的大致区别: 1.ArrayList是实现了基于动态数组的数据结构,LinkedList基于链表的数据结构. 2.对于随机访问get和set,Ar ...
- 【转载】格式化存储装置成为 Ext2/Ext3/Ext4 档案系统
格式化 用系统管理员帐户 (即 root) 身份打「mkfs -t ext2|ext3|ext4 储存装置」: mkfs -t ext3 /dev/sdb5 要格式化档案系统为 Ext2,亦可以直接使 ...
- kubernetes 核心对象
Pods Pod是Kubernetes的基本操作单元,也是应用运行的载体.整个Kubernetes系统都是围绕着Pod展开的,比如如何部署运行Pod.如何保证Pod的数量.如何访问Pod等.另外,Po ...
- struts2中常用配置
1.Post提交乱码问题,如果编码采用的是utf-8,那么默认不需要自己处理,因为其默认的常量配置文件就是处理UTF-8的 这个常量值只处理POST提交,get如果乱码还得自己写拦截器处理,一般只要页 ...
- js提示确认删除吗
<script language="javascript"> function delcfm() { if (!confirm("确认要删除?")) ...
- waitpid使用的一点问题
使用waipid的时候遇到了一个奇怪的问题,将情况简化后描述一下. 有关waitpid的基本介绍参见这里一下:http://www.cnblogs.com/mickole/p/3187770.html ...
- Qt之密码框不可全选、复制、粘贴无右键菜单等
转载---> http://blog.sina.com.cn/s/blog_a6fb6cc90101artk.html 在做用户登录界面的时候,往往会用到密码框,则其中的一些功能也要求与普通的输 ...
- servlet中service() doGet() doPost() 方法
HttpServlet 里的三个方法:service(HttpServletRequest req, HttpServletResponse resp) ,doGet(HttpServletReque ...
- numpy加权平均
import numpy as np a = np.arange(15).reshape(3,5) a array([[ 0, 1, 2, 3, 4], [ 5, 6, 7, 8, 9], ...
- 【NOIP2014 普及组】螺旋矩阵
[NOIP2014 普及组]螺旋矩阵 一.题目 [NOIP2014 普及组]螺旋矩阵 时间限制: 1 Sec 内存限制: 128 MB 提交: 18 解决: 0 [提交][状态][讨论版] 题目描 ...