Re: Fail to change MySQL data directory on ubuntu

2009-08-28 Thread chen jia
That is likely the case. As you said, I do not use innodb tables. Best, Jia On Fri, Aug 28, 2009 at 8:25 AM, Johnny Withers wrote: > Maybe you do not use innodb tables, in that case there would be no data loss. > > On Thursday, August 27, 2009, Jia Chen wrote: >> Thanks for the tips. Where can I

Re: Fail to change MySQL data directory on ubuntu

2009-08-28 Thread Johnny Withers
Maybe you do not use innodb tables, in that case there would be no data loss. On Thursday, August 27, 2009, Jia Chen wrote: > Thanks for the tips. Where can I find more details about the ibdata file? > > After I changed the data dir, hese file did get recreated. So far, I have not > noticed any

Re: Fail to change MySQL data directory on ubuntu

2009-08-27 Thread Jia Chen
Thanks for the tips. Where can I find more details about the ibdata file? After I changed the data dir, hese file did get recreated. So far, I have not noticed any data loss yet. Best, Jia Eric Bergen wrote: That procedure is horribly incorrect. You should simply move the ib_log and ibdata f

Re: Fail to change MySQL data directory on ubuntu

2009-08-27 Thread Eric Bergen
That procedure is horribly incorrect. You should simply move the ib_log and ibdata files with the rest of the datadir. The ibdata1 file contains innodb's system tables and depending on your setting of innodb_file_per_table it also contains your data! On Thu, Aug 27, 2009 at 7:56 AM, Jia Chen wrote

Re: Fail to change MySQL data directory on ubuntu

2009-08-27 Thread Jia Chen
> Chen, Did you really delete ibdata1 ? Yes, I did. Best, Jia Claudio Nanni wrote: 2009/8/26 chen jia mailto:chen.1...@gmail.com>> Hi there, I am using MySQL on ubuntu 8.04. I followed this link http://www.ubuntu-howto.info/howto/how-to-move-mysql-databases-to-another-lo

Re: Fail to change MySQL data directory on ubuntu

2009-08-27 Thread Claudio Nanni
2009/8/26 chen jia > Hi there, > > I am using MySQL on ubuntu 8.04. > > I followed this link > > http://www.ubuntu-howto.info/howto/how-to-move-mysql-databases-to-another-location-partition-or-hard-drive > to change the data directory of MySQL. > > After stopping MySQL: sudo /etc/init.d/mysql sto

Re: Fail to change MySQL data directory on ubuntu

2009-08-26 Thread Jia Chen
Hi Johnny, Thanks you so much! Your command fixed the problem beautifully. Now, MySQL can start successfully. I can create and drop databases without problem. Thanks again. Best, Jia Johnny Withers wrote: I'm at work now, this is the cmd I used: chcon -R -u system_u -r object_r -t mysql_d

Re: Fail to change MySQL data directory on ubuntu

2009-08-26 Thread Johnny Withers
I'm at work now, this is the cmd I used: chcon -R -u system_u -r object_r -t mysql_db_t /data (my data lives in /data/mysqlXX -- were XX is the server version) On Wed, Aug 26, 2009 at 8:02 AM, Johnny Withers wrote: > Yes, error 13, permission denied. Check selinux setup. I had this same > proble

Re: Fail to change MySQL data directory on ubuntu

2009-08-26 Thread Johnny Withers
Yes, error 13, permission denied. Check selinux setup. I had this same problem last week on a CentOS machine. I had to change the object type of the new data dir to mysqld-something. I'm on a mobile phone and can't remember the exact cmd. On Tuesday, August 25, 2009, Jia Chen wrote: > I run sudo

Re: Fail to change MySQL data directory on ubuntu

2009-08-25 Thread Jia Chen
I run sudo /etc/init.d/mysql start and check the syslog by running sudo tail -f /var/log/syslog This is what I get Aug 25 22:18:06 chenj-desktop mysqld_safe[10934]: started Aug 25 22:18:06 chenj-desktop kernel: [11083.933531] type=1503 audit(1251253086.020:43): operation="inode_create" requeste

Re: Fail to change MySQL data directory on ubuntu

2009-08-25 Thread Johnny Withers
First, check the error log, if you can't find it, start mysql from the cmd line by running safe_mysqld it should print errors to console. If it is a permission issue, it might be caused be selinux, you'll need to change the object type od that new directory to mysqld- something. I can't recall the

Fail to change MySQL data directory on ubuntu

2009-08-25 Thread chen jia
Hi there, I am using MySQL on ubuntu 8.04. I followed this link http://www.ubuntu-howto.info/howto/how-to-move-mysql-databases-to-another-location-partition-or-hard-drive to change the data directory of MySQL. After stopping MySQL: sudo /etc/init.d/mysql stop I make a new directory: sudo mkdir