Bug #65291 Centos 5/6 + Nas + Open VZ + Mysql Permissions Error
Submitted: 12 May 2012 0:00 Modified: 12 May 2012 10:20
Reporter: Aus Net Servers Australia Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Installing Severity:S1 (Critical)
Version:Latest OS:Linux (5/6)
Assigned to: CPU Architecture:Any
Tags: install, MySQL, nas, openvz

[12 May 2012 0:00] Aus Net Servers Australia
Description:
Hi,

We are having a problem installing / initilizing the system databases of mysql on first run. I have listed all availible information as well as what we jave ( equipment wise ) and what we have tried to rectify this issue.

Equipment:

NAS Server (CIFS Service ) - Free Nas 8 / Open Filer
Dell Power Edge 2650 ( 4GB  Ram, 131GB Hdd, 2x 3.20GHZ Dual Xeon )
OpenVZ
Solus VM Control Panel running on Centos os 5 x86

The issue seems to be when you first issue the command "service mysqld start" it generally has to import and setup the system tables. In my case it spits out the following:

[root@status ~]# service mysqld start

Initializing MySQL database: Installing MySQL system tables...

120512 5:03:09 [Warning] Could not remove temporary table: '/tmp/#sql3757_1_0', error: 1

ERROR: 1036 Table 'tmp_db' is read only

120512 5:03:09 [ERROR] Aborting

120512 5:03:09 [Note] /usr/libexec/mysqld: Shutdown complete

Installation of system tables failed! Examine the logs in

/var/lib/mysql for more information.

You can try to start the mysqld daemon with:

shell> /usr/libexec/mysqld --skip-grant &
and use the command line tool /usr/bin/mysql
to connect to the mysql database and look at the grant tables:

shell> /usr/bin/mysql -u root mysql
mysql> show tables

Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /var/lib/mysql that may be helpful.

Please consult the MySQL manual section
'Problems running mysql_install_db', and the manual section that
describes problems on your OS. Another information source are the
MySQL email archives available at http://lists.mysql.com/.
Please check all of the above before mailing us! And remember, if
you do mail us, you MUST use the /usr/bin/mysqlbug script!

[FAILED]
[root@status ~]#

So okay we can see it is complaining about a database that is read only. I have contact Solus VM and they have been trying to help us fix this issue.

This first thing we did to isolate the issue was we created a virtual machine on the servers local scsi hard drive array and it worked, mysql installed and imported its databases which to me would suggest that what ever the issue its realted to udev on the virtual machine and mysql along with openvz.
 
It is not a permissions issue of writing the files to the nas because the os is installed on the nas fine, and it can download and store files without any issue. This issue seems to be related to mysql running on a nas server powered by openvz.

I have tried every combination you can think of and differant operating systems between Centos 5 and Centos 6. None of which have made any effect.

Even though mysql spat the error above out at me i tried to get access to "mysql -p" and was presented with the "Password:" feild. As i had not set a password i hit enter without entering a password and was greated with the following error:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

I have tried to reset the password and it seems to not apply. As soon as you reset mysql out of same mode it reverts back to the same issue.

I am adimate that this issue is related to Openvz not assinging the correct permissions to the nas files for the vm more the /dev folder in the vm thus mysql tries to do its startup thing and fails with all sorts of error

How to repeat:
Please see the above information.
[12 May 2012 0:04] Aus Net Servers Australia
I have tried lots of diferant OS images and they all seem to tell me the same errors. 

Here is some information:

http://sysadminman.net/blog/2010/openvz-mysql-root-password-fail-1383
http://www.howtoforge.com/reset-forgotten-mysql-root-password

This issue seems to be an issue that has been outstanding for some time but i am unsure what the cause is or how to fix it. With the lack of logs to support my case i am sitting in the dark
[12 May 2012 10:20] Valeriy Kravchuk
We're sorry, but the bug system is not the appropriate forum for asking help on using MySQL products. Your problem is not the result of a bug in MySQL code.

Support on using our products is available both free in our forums at http://forums.mysql.com/ and for a reasonable fee direct from our skilled support engineers at http://www.mysql.com/support/

Thank you for your interest in MySQL.