Divi WordPress Theme

Topic: Chanage MySQL location from /var/lib/mysql  (Read 2067 times)

Offline Mike

  • New Member
  • *
  • Posts: 36
  • iTrader: +0/-0
    • View Profile
Chanage MySQL location from /var/lib/mysql
« on: March 23, 2008, 07:08:39 PM »
Hi all,

I have critical problem on my linux box. I have Red Hat Linux/WHM installed server and I have /var partition of the size 10 GB. Now, /var is near to reach its allocated space and I am storing the mysql databases at /var/lib/mysql (i think it a default location of mysql database). Is it posisble to move mysql databases to other location instead of /var/lib/mysql/ ?

Thanks,

Mike
« Last Edit: January 01, 1970, 05:30:00 AM by Mike »
VPS Hosting - AccuWebHosting

Offline John

  • Newbie
  • *
  • Posts: 6
  • iTrader: +0/-0
    • View Profile
Chanage MySQL location from /var/lib/mysql
« Reply #1 on: April 13, 2008, 07:15:49 PM »
Hi Mike,

it is possible to move your mysql databases to other location. Just follow the below steps:

- Stop mysql service.
- Move your databases to other location.
- Change the path of your mysql database directory in my.cnf (probably it is in /etc) file.
- Start MySQL service.

Or you can just create a symlink /var/lib/mysql to point to new location.

John
« Last Edit: January 01, 1970, 05:30:00 AM by John »
Divi WordPress Theme
Tags: