OpenVZ Forum


Home » General » Support » (SOLVED) unable to start mysql in Centos 4.3 vps
(SOLVED) unable to start mysql in Centos 4.3 vps [message #2398] Mon, 03 April 2006 11:57 Go to next message
wnpaul is currently offline  wnpaul
Messages: 15
Registered: March 2006
Location: Vienna, Austria
Junior Member
I initially set up five Centos 4.3 vps, by setting up one and then copying both the directory in /vz/private and the config file in /etc/sysconfig/vz-scripts four times, then changing ip addresses and hostnames.

These five vps work just fine.

Last week I got another 16-node subnet, giving me another 13 addresses for vps, so I repeated the process, copying both the file tree for one of the working servers and a config file 13 times.

All of these aditional vps start just fine, but they will not run mysqld -- rather, they produce these messages in /var/log/mysqld.log:

060403 13:21:51 mysqld started
060403 13:21:51 [ERROR] Can't start server : Bind on unix socket: Permission denied
060403 13:21:51 [ERROR] Do you already have another mysqld server running on socket: /var/lib/mysql/mysql.sock ?
060403 13:21:51 [ERROR] Aborting

Here is the output of ps -ax:

PID TTY STAT TIME COMMAND
1 ? Ss 0:00 init
27951 ? Ss 0:00 syslogd -m 0
27985 ? Ss 0:00 /usr/sbin/sshd
28011 ? Ss 0:00 xinetd -stayalive -pidfile /var/run/xinetd.pid
28064 ? Ss 0:00 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf
32033 ? Ss 0:00 /usr/sbin/httpd
32068 ? Ss 0:00 crond
32111 ? S 0:00 /usr/sbin/httpd
32112 ? S 0:00 /usr/sbin/httpd
32113 ? S 0:00 /usr/sbin/httpd
32114 ? S 0:00 /usr/sbin/httpd
32115 ? S 0:00 /usr/sbin/httpd
32116 ? S 0:00 /usr/sbin/httpd
32117 ? S 0:00 /usr/sbin/httpd
32118 ? S 0:00 /usr/sbin/httpd
32397 ? Ss 0:00 /usr/bin/perl /usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf
9914 ? Ss 0:00 sshd: root@pts/0
9916 pts/0 Ss 0:00 -bash
18420 pts/0 R+ 0:00 ps ax


Any ideas?

Thanks,

Wolf


Wolf N. Paul - Doulos Communications
Vienna, Austria

[Updated on: Mon, 03 April 2006 16:55]

Report message to a moderator

Re: unable to start mysql in Centos 4.3 vps [message #2401 is a reply to message #2398] Mon, 03 April 2006 15:00 Go to previous messageGo to next message
Tellerdreher is currently offline  Tellerdreher
Messages: 13
Registered: October 2005
Junior Member
I rather think that this is a MySQL issue. Did you check the permissions/ownership of the mysql.sock file? Perhaps you did not copy ownerships and permissions of the /vz/private/XYZ directory (/bin/cp -p)?

The sock file should look like this:
bash-3.00# ls -al /var/lib/mysql/mysql.sock
srwxrwxrwx  1 mysql mysql 0 Mar 31 11:47 /var/lib/mysql/mysql.sock

Re: unable to start mysql in Centos 4.3 vps [message #2403 is a reply to message #2401] Mon, 03 April 2006 16:42 Go to previous messageGo to next message
wnpaul is currently offline  wnpaul
Messages: 15
Registered: March 2006
Location: Vienna, Austria
Junior Member
Thank you for the hint.

I don't know WHAT went wrong, because permissions all looked o.k.,
but apparently copying with

"find vpsdir | cpio -pdmu newvpsdir"

does not work quite right, resulting in the error I described,
whereas

"cp -r -d --preserver=all vpsdir newvspdir"

does work correctly, and everything starts up properly.

Thanks again.


Wolf N. Paul - Doulos Communications
Vienna, Austria
Re: unable to start mysql in Centos 4.3 vps [message #2408 is a reply to message #2403] Mon, 03 April 2006 22:32 Go to previous messageGo to next message
dowdle is currently offline  dowdle
Messages: 261
Registered: December 2005
Location: Bozeman, Montana
Senior Member
Not sure why you went the copy method to begin with... but it is your choice. If you are a slew of applications you'd like to have installed by default that aren't... just edit:

/vz/template/centos/4/i386/config/default.list

and rebuild your cache. Don't forget to rebuild your cache every so often anyway so it will grab all of the updates and create fully updated VPSes. Of course, you can do it however you want to but that's how I do it. Smile

I guess if you have done a lot of work on configuration, third party app installation, and populating your apps with data (especially MySQL), the copy method would be the way to go.

For making exact copies, I would recommend rsync with the -avSH flags... even works over the network via ssh if desired. rsync is also the preferred way to migrate a VPS from one machine to another.


--
TYL, Scott Dowdle
Belgrade, Montana, USA
Re: unable to start mysql in Centos 4.3 vps [message #2428 is a reply to message #2408] Tue, 04 April 2006 11:34 Go to previous message
wnpaul is currently offline  wnpaul
Messages: 15
Registered: March 2006
Location: Vienna, Austria
Junior Member
Thanks for these hints. It would be useful to have "working invocations" of various copy methods in some sort of FAQ.

Pre-installed CPAN modules are indeed the reason for using copying to create VPS instances -- many are not available as RPMs.


Wolf N. Paul - Doulos Communications
Vienna, Austria
Previous Topic: Logging for several VMs
Next Topic: allocate more ptys to ve
Goto Forum:
  


Current Time: Fri Nov 08 05:19:49 GMT 2024

Total time taken to generate the page: 0.04367 seconds