View Single Post

   
  #2 (permalink)  
Old 04-29-2008, 08:27 PM
Raj Shekhar
 
Posts: n/a
Default Re: how to move the data directory?

boll wrote:

> I would like to know the correct way to move the mysql data directory to
> a different disk partition, so that the data can be accessed by mysql
> under linux or windows. I'm using Ubuntu 7.1 and Windows XP.


I wrote these steps for 4.0, I think they should work for you
<http://rajshekhar.net/blog/archives/90-Moving-the-MySQLs-datadir-directory..html>

Make sure you do a clean shutdown of mysqld before doing the steps (i.e. no
kill -9 business)


>
> I copied the data directory to a separate partition.
> I then changed the datadir in my.cnf, but Mysql would not start, warning:
> ERROR 2002 (HY000): Can't connect to local MySQL server through socket
> '/var/run/mysqld/mysqld.sock'


Check mysqld.err file to see your errors.

--
raj shekhar
facts: http://rajshekhar.net | opinions: http://rajshekhar.net/blog
Yoda of Borg are we: Futile is resistance. Assimilate you, we will
'Borg? Sounds Swedish.' - Lily, Star Trek First Contact

Reply With Quote