Page 1 of 1
Installation Fails because of mysql
Posted: Wed Oct 26, 2005 1:53 am
by Stucco
Code: Select all
yum install psa
...........
Trying to start MySQL server... done
Trying to establish test connection...
ERROR while trying to establish test connection
Check the error reason(see log file: /tmp/psa_7.5.4_FedoraCore_3_build75050824.12_installing.log), fix and try again
Aborting...
Other notes...
Code: Select all
yum list mysql mysql-server
mysql.i386 4.1.14-1.rhfc3.art installed
mysql-server.i386 4.1.14-1.rhfc3.art installed
Code: Select all
/etc/rc.d/init.d/mysqld start
Starting MySQL: [ OK ]
/etc/rc.d/init.d/mysqld stop
Stopping MySQL: [FAILED]
Code: Select all
mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
I have installed and removed mysql and mysql-server many times, all with yum. I have rebooted.
Posted: Wed Oct 26, 2005 9:30 am
by scott
Sometimes mysql doesnt restart correctly, so you might have to run it more than once
Posted: Wed Oct 26, 2005 11:20 am
by Stucco
Huh? I've
started and stopped the service 20+ times
rebooted the machine 3+ times before and after install
removed and reinstalled mysql and mysql-server 5+ times through yum using art repositories
I never get anything except that error.
The only thing I can think of is I installed the native firewall when I installed fedora core 3. I'm going to work on that front for a while.
Posted: Wed Oct 26, 2005 1:31 pm
by Stucco
I haven't found any way to disable the firewall, however I found a few more commands yielding more info.
Code: Select all
[root@server mysql]# tail /var/log/mysqld.log
051026 10:30:52 mysqld started
051026 10:30:52 mysqld ended
051026 12:01:56 mysqld started
051026 12:01:56 mysqld ended
051026 12:05:20 mysqld started
051026 12:05:20 mysqld ended
Code: Select all
[root@server mysql]# /etc/rc.d/init.d/mysqld status
mysqld dead but subsys locked
I have tried everything here too with no results. It looks like I have this same problem
http://archives.neohapsis.com/archives/ ... /4788.html
Posted: Wed Oct 26, 2005 2:30 pm
by Stucco
After these few pages, this is what I have done to fix it...
Purge everything and start over.
if you have any
ps -e | grep mysqld
then use
killall mysqld
and check the above again until all are dead.
Remove mysql
yum remove mysql mysql-server
Remove lock file if it exists
rm /var/lock/subsys/mysql
Remove data dir (backup if needed)
rm -Rf /var/lib/mysql/*
Set SELinux enforcement to 0
/usr/sbin/setenforce 0
Install mysql and mysql-server
yum install mysql mysql-server
Test with
mysql
Set SELinux enforcement to 1
/usr/sbin/setenforce 1
It comes down to having SELinux Enforcement off when starting mysql. I'm not sure how to turn it off for mysqld permenantly without a gui. There is a way to do it with a gui here (
http://forums.mysql.com/read.php?11,716 ... #msg-11556)
Helpful Pages
http://www.linuxquestions.org/questions ... ost1726218
http://forums.mysql.com/read.php?11,7164,7164#msg-7164
https://bugzilla.redhat.com/bugzilla/sh ... ?id=141062
I suspect that if I reboot mysql will fail again because SELinux will be enabled when it is started. I would really like a way to disable it for just mysqld from the command line. I am remoted to the server and have no gui available.
Posted: Wed Oct 26, 2005 4:26 pm
by Stucco
I'm done. After all that, there is more.
I don't know how to make it work without disabling SELinux.
Disable it by changing SELINUX=disabled in /etc/sysconfig/selinux.
Set MySQL to start on boot with
/sbin/chkconfig --list mysqld
/sbin/chkconfig --level 345 mysqld on
Restart.
Then test with mysql.
Posted: Wed Oct 26, 2005 8:44 pm
by scott
You can disable selinux at boot time from grub, add in selinux=0 to /etc/grub.conf
example:
kernel /vmlinuz-2.6.13-1.1532_FC4smp ro root=LABEL=/ selinux=0