Hi,

I am running the script

/var/lib/mysql/dbmail[157] mysql < 2_2-3_0.mysql

on an old host (test host) that I want to migrate.

I get the error:

ERROR 1025 (HY000) at line 68: Error on rename of './dbmail/#sql-9dd_357e'
to './dbmail/dbmail_users' (errno: 150)

I have been fixing it one db at a time by doing:
mysql>show create table dbmail_...
and then
mysql>alter table dbmail_sievescripts  drop foreign key
dbmail_sievescripts_ibfk_1; (for example)

I have done this to 8 tables, but I am thinking that there has to be a
shorter way to do this.
It seems that the command
SET FOREIGN_KEY_CHECKS=0;
at the beginning of the script doesn't work.
I am doing lots of googling on this but appreciate your comments if you
know what is it that is preventing the script from running smoothly.

Thanks,
  Dirce

> On 02/08/2012 10:56 AM, Reindl Harald wrote:
>>
>>
>> Am 08.02.2012 10:41, schrieb Paul J Stevens:
>>> On 02/08/2012 10:31 AM, Reindl Harald wrote:
>>>>
>>>> this maybe a much smoother way as export/transfer/import gigabytes
>>>> of mysqldumps since it does not interrupt services
>>>
>>> How does a mysqldump interrupt services??
>>
>> dumping gigabytes of data takes time
>> i guess there are partly locks
>>
>> but the dumping is not the main problem
>>
>> it is the time until the dump is on the new server imported
>> finally you need imapsync after the import to get the
>> last messages even after change the MX since there is
>> a timewindow where new messages are received on the old one
>
> Eh, if you use 'mysqldump --single-transaction' the top of the output
> will contain the information you need to start-up the new mysql
> installation as a slave of the old one.
>
> And --single-transaction will also prevent table locks and enable MVCC
> if the database dumped is in innodb.
>
>
>
> --
> ________________________________________________________________
> Paul J Stevens        pjstevns @ gmail, twitter, skype, linkedin
>
>   * Premium Hosting Services and Web Application Consultancy *
>
>            www.nfg.nl/i...@nfg.nl/+31.85.877.99.97
> ________________________________________________________________
> _______________________________________________
> DBmail mailing list
> DBmail@dbmail.org
> http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
>


_______________________________________________
DBmail mailing list
DBmail@dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail

Reply via email to