开发者

another mysqld process using the same InnoDB data or log files

I have a mysql server running on linux system. i'm already running one c++ prog which is building up the data base with current date and time stamp. I'm trying to run another process in c++ which is accessing different db but i'm having error.

error is as below:

InnoDB: check that you do not have another mysqld process
InnoDB: using the same InnoDB data or log files
InnoDB: Unable to lock /var/lib/mysql/ibdata1, error: 11

please can somebody explain whats going wrong in here

than开发者_StackOverflow社区ks


I was solved this problem by kill mysqld process

To kill all mysqld process on Linux :

# killall mysqld mysqld_safe

Wait for 10 seconds atleast so that it shut down cleanly.

Now, run this command to check whether still there are some mysqld process remained or not ?

# ps aux | grep mysqld

If you still able to see more than run this command :

killall -9 mysqld mysqld_safe

This will kill all mysqld processes.


This page: http://dev.mysql.com/doc/refman/5.0/en/external-locking.html

Talks about "external locking" which can be turned on or off for MyISAM databases to support multiple servers on one set of data. It does not seem to apply to InnoDB however. And this page: http://book.opensourceproject.org.cn/lamp/mysql/mysql5cert/opensource/0672328127/ch42lev1sec1.html

Says it's not possible with InnoDB because it can only be done on read-only filesystems, and InnoDB does not work on those.

So it seems the answer is that you cannot do it, for two reasons: first because you are still populating the DB while also wanting to read it, and second because you are using InnoDB rather than MyISAM.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜