Tag Info

New answers tagged

1

I have a script to move MySQL data from one version to another as long as it is MySQL 5.x If you look at my old post MySQL upgrade 5.0.88 to latest, I handle this situation going to a higher version. With slight modifications, I can make this process go backwards. STEP 01 : mysqldump all databases except mysql, information_schema, performance_schema ...


2

What you need to do is mysqldump separate tables in batches and load them. On your new CentOS server, write the following MYSQL_SOURCE_HOST=10.20.30.40 MYSQL_SOURCE_USER=root MYSQL_SOURCE_PASS=rootpassword SRC_CONN="-h${MYSQL_SOURCE_HOST} -u${MYSQL_SOURCE_USER} -p${MYSQL_SOURCE_PASS}" MYSQL_TARGET_HOST=localhost MYSQL_TARGET_USER=root ...


0

There's a good post here. I suggest that you spend some time studying this page (I'm assuinmg that you are familiar with Informix). As the first post suggests, you'll have a lot more trouble if you are migrating stored procedures - frequently there isn't a 1-to-1 correspondance between logical constructs as there can be between different datatypes. As for ...


0

You first need to convert that output file nearest to MySQL syntax and convert the data type according to MySQL. You could user perl or sed scripts for first time and then use these techniques for future use. Once you have prepared the files of table creation then generate dynamic insert statements from informix and use them in MySQL for loading data. ...


0

This is the solution I came up with: Enable xp_cmdshell with EXEC sp_configure 'show advanced options', 1 COMMIT GO RECONFIGURE GO EXEC sp_configure 'xp_cmdshell', 1 COMMIT GO RECONFIGURE GO If needed create a directory with xp_cmdshell to get the needed permissions. EXEC master..xp_cmdshell 'mkdir C:\exportdir' Use BCP with queryout EXEC ...


0

Basically what Filip De Vos said but with triggers on the old table to keep the shadow copy in sync while data is transferred. In the past I've used a view to achieve fast switch-over and fail-back from old to new table. In preparation for go-live rename DataTable to DataTable_old; create a view DataTable which simply select <all columns> from ...


1

What I do in this case is: create a shadow table with the new schema move over all the data xlock the original table apply the changes since moving the data rename the original table to bak rename the "new" table to the correct name This makes your downtime minimal at the cost of disk space.


0

Have you tried pt-online-schema-change tool (free) from Percona? It may solve your locking problem. http://www.percona.com/doc/percona-toolkit/2.1/pt-online-schema-change.html


0

I feel your pain on this issue and while I do not have an insightful way of speedily adding fields I can tell you what every company I have ever worked for has used as the approach to these sorts of live data problems. In all cases no matter what other clever tricks we have been using the company will announce a scheduled maintenance window. With the best ...


0

I've promoted about 2X speed by named pipe. First step:(create a named pipe) mkfifo p1 Second step:(waiting to convert) cat p1| iconv -f GBK -t UTF-8 > target.file Last step:(export to p1, see the sql scripts below) SET OPTION TEMP_EXTRACT_NAME1 = 'p1'; SELECT * FROM MY_TABLE; SET OPTION TEMP_EXTRACT_NAME1 = '';


2

Create a sequence and use it as the default value for the column: create sequence measures_measure_id_seq owned by measures.measure_id; alter table measures alter column measure_id set default nextval('measures_measure_id_seq'); commit; That essentially what serial does. See the manual for details: ...


0

WAL vs statement log ordering Do the statements in the log file appear in the same order as they do in the WAL file? That doesn't really make sense. Statements do not appear in the WAL at all. Their effects do, in terms of transaction begins/commits/rollbacks, changes to table heap and index blocks, etc, but the actual statement is never recorded in ...



Top 50 recent answers are included