Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I tried to upgrade my system PHP from PHP 5.2 to 5.3 using starting with script http://www.atomicorp.com/installers/atomic.sh.

I then used yum to update it. Everything seemed to work sweet but then I can't start the mysql daemon again, and the new version of PHP doesn't even seem to be in use by the sites.

I have a DV hosted at mediatemple and I just really need to get it going. My next step is to reset the container to factory settings and try and copy everything across.

When I try and start mysql using /etc/init.d/mysqld restart I get the following in the error log

111020 20:13:57 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
nohup: cannot run command `/usr/libexec/mysqld': Permission denied
111020 20:13:57 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

I hunted all over Google and I can't fine anything with my issue of the lib exec having permission denied.

Using uname -a I get the following for my OS info

Linux leereichardt.co.nz 2.6.9-023stab051.3-enterprise #1 SMP Wed Nov 4 19:28:06 MSK 2009 i686 i686 i386 GNU/Linux

and cat /etc/redhat-release gives me

CentOS release 5.2 (Final)

Here is my my.cnf file

[mysqld]
query-cache-type = 1
query-cache-size = 8M

#basedir=/usr
#set-variable=local-infile
log-error=/var/log/mysqld.log
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

user=mysql

# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

#set-variable = innodb_buffer_pool_size=2M
#set-variable = innodb_additional_mem_pool_size=500K
#set-variable = innodb_log_buffer_size=500K
#set-variable = innodb_thread_concurrency=2
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid


#set-variable = innodb_buffer_pool_size=2M
#set-variable = innodb_additional_mem_pool_size=500K
#set-variable = innodb_log_buffer_size=500K
#set-variable = innodb_thread_concurrency=2

Outputs below ls -la /var/lib/mysql

total 28852
drwxr-xr-x 20 mysql mysql     4096 Oct 20 11:59 .
drwxr-xr-x 25 root  root      4096 Oct 20 12:12 ..
drwxr-xr-x  2 mysql mysql    12288 Sep  6 20:12 c5_growtheseed
drwxr-xr-x  2 mysql mysql     4096 Jan 20  2011 cueit
drwxr-xr-x  2 mysql mysql     4096 Apr 20  2010 horde
-rwxr-xr-x  1 mysql mysql  5242880 Oct 20 11:59 ib_logfile0
-rwxr-xr-x  1 mysql mysql  5242880 Oct 19 01:59 ib_logfile1
-rwxr-xr-x  1 mysql mysql 18874368 Oct 20 11:59 ibdata1
drwxr-xr-x  2 mysql mysql     4096 Apr  9  2010 ifight
drwxr-xr-x  2 mysql mysql     4096 Apr 19  2011 jkb
drwxr-xr-x  2 mysql mysql     4096 Apr  7  2011 joe_amos
drwxr-xr-x  2 mysql mysql     4096 May 13 19:02 kidontherock
-rwxr-xr-x  1 mysql mysql     2216 Oct 20 11:48 leereichardt.co.nz.err
drwxr-xr-x  2 mysql mysql     4096 Jun  7 20:49 my_wordpress
drwxr-xr-x  2 mysql mysql     4096 Oct 20 12:20 mysql
drwxr-xr-x  2 mysql mysql    20480 Apr 13  2010 pathways_moodle
drwxr-xr-x  2 mysql mysql    24576 Dec 20  2010 pathways_test_moodle
drwxr-xr-x  2 mysql mysql     4096 Apr  9  2010 phpmyadmin_aUPVzrrE9aev
drwxr-xr-x  2 mysql mysql     8192 Apr  9  2010 psa
drwxr-xr-x  2 mysql mysql     4096 Mar  1  2011 rscc_website
drwxr-xr-x  2 mysql mysql     4096 Jul 20  2010 rscc_youth
drwxr-xr-x  2 mysql mysql     4096 Jul 14 15:24 spence
drwxr-xr-x  2 mysql mysql     4096 Sep 29 22:28 victor_wp
drwxr-xr-x  2 mysql mysql     4096 Apr 12  2010 wp_theblower

Output of ls -la /var/run/mysqld

total 8
drwxr-xr-x  2 root mysql 4096 Oct 20 16:35 .
drwxr-xr-x 18 root root  4096 Oct 20 13:21 ..

Output of ls -ld /tmp

drwxrwxrwt 533 root root 16384 Oct 20 13:21 /tmp
share|improve this question
    
Post the MySQL config? Did you run the init script as root? getenforce? ls -la /var/lib/mysql? ls -la /var/run/mysqld? ls -ld /tmp? –  quanta Oct 20 '11 at 7:37
    
I added my my.cnf file above. I ran the /etc/init.d/msqld script as the su user. Is that what you mean? What are you want me to with these ls -la /var/lib/mysql? ls -la /var/run/mysqld? ls -ld /tmp? Sorry, I'm not all that experienced at linux, and this is something I shouldn't have taken on! –  LeeR Oct 20 '11 at 7:47
    
Run that commands from your terminal and give us the output. –  quanta Oct 20 '11 at 7:51
    
Added outputs above –  LeeR Oct 20 '11 at 7:54

2 Answers 2

up vote 1 down vote accepted

It looks to me that /usr/libexec/mysqld is a directory - and directories can not be executed. It is usually a file.

You need to replace this with the file from the old package. If that doesn't work, you probably need to reinstall your MySQL-packages.

share|improve this answer
    
I try the /etc/init.d/mysqld when I am logged in as su. Is that what you mean? I tried your answer above and I am getting the same thing. –  LeeR Oct 20 '11 at 7:45
    
What's the output of ls -la /usr/libexec/mysqld ? –  Kvisle Oct 20 '11 at 7:47
    
[root@leereichardt httpdocs]# ls -la /usr/libexec/mysqld total 8 drwxrwxr-x 2 mysql mysql 4096 Oct 20 12:04 . drwxr-xr-x 10 root root 4096 Oct 20 12:04 .. Sorry. I wasn't sure how to format it properly in the comments –  LeeR Oct 20 '11 at 7:47
    
Edited my reply - it is pretty clear what the problem is now :) –  Kvisle Oct 20 '11 at 8:26
1  
HALLELUJAH! It works! I used yum install mysql-server. I'm sure I done it a few times. But this time it actually worked! Thanks for all your help anyway. This has been killing me! Note to self - never do this again! –  LeeR Oct 20 '11 at 8:56
# chown -R mysql /var/run/mysqld/

and try again.

share|improve this answer
    
Yep. I have seen that one a few times. I tried it but it didn't work. I still get the permission denied error on /usr/libexec/mysqld –  LeeR Oct 20 '11 at 8:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.