0

So I am trying to move the database following the directions here: https://stackoverflow.com/questions/11069422/what-to-do-when-mysql-has-no-space-left/11070334#11070334 (option #3 in the long post that describes the process in detail) and I know that Percona MySQL has no my.cnf by default until you create it and change the default settings.

Now here is where my problem starts, I want to move datadir = /var/lib/mysql to datadir = /mnt/volume-2.

having the data at the default location of /var/lib/mysql is giving me this error:

* /etc/init.d/mysql: ERROR: The partition with  is too full!

So I gotta move to more space. But when I create a new my.cnf at /etc/my.cnf and I add put the following in the file:

[mysqld]
datadir = /mnt/volume-2

I restart mysql and I fails to start. Am I doing something wrong?

jon
  • 1
  • If it fails to start, doesn't it tell you why...? – Grumpy Sep 27 '14 at 02:03
  • is there an error showing up in the mysql error log? what I would probably do in your situation is to create a folder `mkdir /mnt/volume-2/mysql` then `cd /var/lib` and `mv mysql mysql-old` or what have you, then `ln -s /mnt/volume-2/mysql mysql` and then you have a mysql directory in the default location (/var/lib/mysql) but hosted on the new big partition. then if you need you could `cp /var/lib/msyql-old/* /var/lib/mysql/` – user16081-JoeT Sep 27 '14 at 02:10

0 Answers0