OpenVZ Forum - RDF feed
type: channel
items: (SOLVED) unable to start mysql in Centos 4.3 vps
items: Re: unable to start mysql in Centos 4.3 vps

(SOLVED) unable to start mysql in Centos 4.3 vps
type: item
description: 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
creator: wnpaul
date: 2006-04-03T11:57:20-00:00

Re: unable to start mysql in Centos 4.3 vps
type: item
description: 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
creator: Tellerdreher
date: 2006-04-03T15:00:46-00:00

Re: unable to start mysql in Centos 4.3 vps
type: item
description: 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.
creator: wnpaul
date: 2006-04-03T16:42:49-00:00

Re: unable to start mysql in Centos 4.3 vps
type: item
description: 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. 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.
creator: dowdle
date: 2006-04-03T22:32:42-00:00

Re: unable to start mysql in Centos 4.3 vps
type: item
description: 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.
creator: wnpaul
date: 2006-04-04T11:34:56-00:00