I've changed data directory in /etc/my.cnf.
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
Hi,
I Installed mysql on my CentOS 6.2 Server. But when I tried to change the location of /var/lib/mysql to another directory. I can't start the mysql.
I am trying to change the data directory for mysql in a LAMP setup. The partition that LAMP is installed in cannot support the size of a .sql dump I am trying to import. I have another hardrive with plenty of room on it that I want all the data to live on.
I have changed the datadir to my new directory and moved the /var/lib/mysql folder and content to it.
I can’t start MySQL on Ubuntu 12.04 after restored backup from innobackupex.
Before I tried to restore the db from backup I moved the datadir and got the same problem.
I tried to change the database dirrectory, datadir, I did the following steps.
My machine: Laptop Ubuntu 11.10 64-bit
Install: sudo apt-get install mysql-server mysql-client
All Ok, I can create databases, tables, all ok.
Change the datadir:
1) $ /etc/init.d/mysql stop
2) $ cp -R -p /var/lib/mysql /new_path
3) $ rm /new_path (this only remove files unnecessary)
4) $ gedit /e
/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
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.
I can start mysql fine,
/usr/local/mysql/support-files/mysql.server start
Starting MySQL
SUCCESS!
But any mysql action after that I get the error: MySQL server PID file could not be found
/usr/local/mysql/support-files/mysql.server stop
ERROR! MySQL server PID file could not be found!
Where do I find the server PID file on Mac with OSX 10.8? I am wondering if it is a permission problem.