Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

Question: is it possible to convert a dump.sql file which was written in PostgreSQL to a MySQL friendly version? I tried uploading the dump.sql file to a MySQL Database space in a linux server but I keep getting the error ERROR 1193 (HY000) at line 5: Unknown system variable 'statement_timeout'. Is there any way to make it compatible?

share|improve this question
1  
What is an "SQL DB" exactly? Also, there's no answer per se. If you stick to elements that are common to all SQL-supporting databases, you may be able to transition an SQL dump from one database to another with some manual tweaks. But some databases do not support all data types, arrays for example. If your dump/database contains those, you'll have to work out a completely different schema first. –  deceze Apr 17 '13 at 0:59
 
sorry. SQL DB stands for sql database –  begin.py Apr 17 '13 at 1:03
3  
Ok, ERROR 1193 (HY000) is a MySQL error. There's that mystery solved –  Phil Apr 17 '13 at 1:11
 
Closevoted because "how do I convert from database <x> to database <y>" questions are often asked and you've shown no sign of having done any searching or research first. What have you already tried? I suggest that you search this site, dba.stackechange.com and serverfault.com (or just do a Google sarch) and read others' questions, it'll be informative. –  Craig Ringer Apr 17 '13 at 3:37
add comment

closed as not a real question by Jack Maney, Iswanto San, bensiu, Craig Ringer, nickhar Apr 17 '13 at 4:06

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

That problem you had will be one of many if you just try to do it like that.

Some ways to "make it compatible" (if one can say that). Correct every single error you have (MySQL and PostgreSQL have some difference and you will have to know them all).

My suggestion: create the schemas manually (or using a export and adapt it to MySQL if is really big), and use CSV exports and imports).

share|improve this answer
 
its a big file. having 9 tables and about 100 entries in each table –  begin.py Apr 17 '13 at 2:06
 
You can also look into ETL tools like Pentaho Kettle or Talend Studio –  Craig Ringer Apr 17 '13 at 3:41
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.