Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the ERRORInnoDB problem in mysql

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the relevant knowledge of "how to solve the ERRORInnoDB problem in mysql". In the operation process of actual cases, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!

[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

Description:

mysqld.sock is a file automatically generated after mysql starts. After MySQL service is closed, this file will be deleted again. If MySQL starts abnormally, it may not generate this file, and this error will appear when logging in.

[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

The error log reports the following error:

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.

Analysis:

1. Insufficient disk space directory

ibdata1 file is occupied by another process

3, etc.

Solution process:

1. --View disk space

[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.

It has been pointed out that other thread start-ups are already running and cannot create permissions for the related read file process again. In other words, the existing ibddata file has been read and cannot be started again!

--View system mysql related processes

[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 kill.

[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*

- Start.

[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>

Description: Return to normal

"How to solve the ERRORInnoDB problem in mysql" is introduced here. Thank you for reading it. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report