开发者

mysqldump column type 'text'

  1. I am planning to move a mysql database to a different host using mysqldump. Some of the tables have columns of type 'text'. Wanted to find out if there are any issues I need to be aware of (eg. text being truncated etc.) since I haven't done this before.

  2. Also here are the steps for migration, can you confirm:

On the original database host:-

mysql> FLUSH TABLES WITH READ LOCK;

mysql> SET GLOBAL read_only = ON;   (leave session open)

mysqldump --all-databases --lock-all-tables --routines --triggers --events --log-error=/tmp/dump_error.log > /tmp/dbdump.sql -p -u root

mysql> SET GLOBAL read_only = OFF;

mysql> UNLOCK TABLES;

On the new host

mysql -p -u root < /tmp/dbdump.sql

FLUSH PRIVILEGES;

3. I am planning to increase the max_connections from 150 to 300 on the new host, 开发者_如何转开发is this fine for this configuration (8 cpu, 16gb ram)


No you're gonna be fine with this approach, although I always used 'UNLOCK TABLES', but that's aside the point.

I do want to point out, if you have a massive database you are better off simply copying the physical files, rather than doing a dump. It's going to save you a TON of time. (still lock all the tables though).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜