I've changed data directory in /etc/my.cnf.
A bit ago, I moved my mysql directory from /var/lib/mysql to /home/lib/mysql. In those steps I created a symlink
ln -s /home/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock
Which worked great. Today, I had to restart mysql through WHM. When I do, it says it failed and mysql isn't running. Trying again doesn't work.
The problem is that my MySQL server keeps crashing every few seconds. Even if I repeat a simple SQL command several times, the MySQL server goes down:
mysql> show databases;
ERROR 2006 (HY000): MySQL server has gone away
No connection.
I was setting up a soft link in linux. Here were the steps I followed:
> groupadd mysql
> useradd -g mysql mysql
> cd /usr/local
> gunzip /home/Tim/Download/mysql.....gz | tar xvf -
> ln -s /usr/local/mysql.... mysql
My server hangs everyday
So i checked system health - process manager in whm
there was a command given below
/usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var/lib/mysql/server.mydomain.com.err --pid-file=/var/lib/mysql/server.mydomain.com.pid --socket=/var/lib/mysql/mysql.sock --port=3306
see this image
here this mysql command process is taking
/usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/lib/mysql/server.example.com.err --open-files-limit=20000 --pid-file=/var/lib/mysql/server1.example.com.pid
Memory is at %10 always and Cpu at %1
Also
/usr/local/apache/bin/httpd -k start -DSSL
I have like 10 of them running
I think yum is having problems installing MySQL 5.1 because there is already a pre-existing MySQL 5.5 installation.
I wanted to cleanly remove MySQL 5.5 (I had problems with 5.5 with PHP and Python).
I have mistakenly deleted some of the dependent file for mysql when I am trying to use mysql command i am getting following error :
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
I have tried reinstalling mysql-server but it still not resolved .
What should I do to bring back everything to normal condition.
I have installed MySQL server 5.5 on Ubuntu 12.04.
I am trying to start MySQL server on a different sock file.