Urgent Help Required - MySQL

Hi all

My server crashed for some unknown reason and I was forced to hard-reset the server.

Since coming back up, I can't access any databases. I can see them all listed in virtualmin under each domain, but when I try to manage I get

/usr/bin/mysqlshow: Cannot list tables in DATABASE: Can't read dir of './DATABASE/' (errno: 24)

I did a quick google which told me to make sure that ownership is correct in /var/lib/mysql, which it seems to be.

Any ideas? Right now I have a lot of sites that are not working.

Many thanks

Status: 
Active

Comments

Howdy -- you may want to make sure MySQL is running, and doesn't throw any errors upon startup.

To check that, log into your server as root, and run this command:

/etc/init.d/mysql restart

What output do you see during that process?

If you don't see any errors, but MySQL appears to start up -- what happens if you try connecting to MySQL with this command:

mysql -u root -p

Do you get a MySQL prompt? If so, can you see the database list by running "show databases"?

I get a prompt, show databases doesn't display anything.

When I restart I get a lot of the following (with different file names)

ERROR 1016 (HY000) at line 1: Can't open file: './wolflan/e107_user_extended_struct.frm' (errno: 24)

Ah, you may be seeing a problem with an open files limit.

One way to fix that would be to edit /etc/mysql/my.cnf, and in the mysqld section, add a line that looks something like this:

open_files_limit = 100000

Once you do that, restart MySQL, and see if things begin working at that point.

Ah - That seems to have done the trick. Thank you very very much :D

Much appreciated.

Sorry for bumping but I have a Virtualmin server with 35 clients / virtual servers and this really saved me =)

Adding open_files_limit = 100000 and restarting the server solved everything. Important to restart the server since restarting the mysql service just throwed errors.

Thanks!!