MySQL Forums
Forum List  »  InnoDB

A bug with innodb on Linux? Can't be started a second time.
Posted by: sknock
Date: April 15, 2005 02:52AM

Here is what i've done (basically just install):

Installed: mysql-standard-4.1.11-pc-linux-gnu-i686.tar.gz
Operating System: Linux RHEL-ws4

Installed in a non-standard location, as non-root(linux)

Ran
bin/mysql_install_db

Started it up from base directory
bin/mysqld_safe &

Everything worked fine, the problem comes when i try and stop and then restart the mysqld... It fails

The message in the hostname.err file is

050415 15:03:41 mysqld started
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Error in opening ./ibdata1
050415 15:03:41 InnoDB: Operating system error number 11 in a file operation.
InnoDB: Error number 11 means 'Resource temporarily unavailable'.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/mysql/en/Operating_System_error_codes.html
InnoDB: Could not open or create data files.
InnoDB: If you tried to add new data files, and it failed here,
InnoDB: you should now edit innodb_data_file_path in my.cnf back
InnoDB: to what it was, and remove the new ibdata files InnoDB created
InnoDB: in this failed attempt. InnoDB only wrote those files full of
InnoDB: zeros, but did not yet use them in any way. But be careful: do not
InnoDB: remove old data files which contain your precious data!
050415 15:03:41 [ERROR] Can't init databases
050415 15:03:41 [ERROR] Aborting

I have no other mysqld running. There is no other mysql on the machine.

ibdata1 and the directory it is contained in (just the default, BASE_DIR/data/) are owned by the same user who owns mysql.

The only way I've found to "fix" this is to
rm ib_logfile1 ib_logfile0 ibdata1

If I then restart mysqld these files are regenerated and it all works fine, but if i try and stop and restart mysqld again I get the same error message as above.

Removing these files (ibdata1 etc) at the moment isn't a problem, but doing so once i've put data into the database is clearly not ideal.

As far as I can tell InnoDB appears to think a mysqld is already running, and that the already running version is using ibdata1.

I've tried rebooting the OS, thinking maybe there was a OS level lock on the file, there wasn't.

Can anyone suggest what i might be missing???

Options: ReplyQuote


Subject
Views
Written By
Posted
A bug with innodb on Linux? Can't be started a second time.
15112
April 15, 2005 02:52AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.