Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

X1Lightning

macrumors 6502
Original poster
Feb 19, 2007
413
0
I just installed the latest version of mysql on my server. and when i go in to the query tool to run my pre populate script it only runs the first insert and then it stops.
so i had to copy paste each insert in and run them one at a time.

Previously i used to use IBM's DB2 and this allowed me to run all the inserts at once.

does anyone know if this is just a limitation of mysql? or am i just missing something?
 
What query tool?

I personally use phpMyAdmin which allows import of .sql files which is the most common way to create, setup and update a database. It also supports CSV, XML and numerous other formats for import/export. We cannot possibly help you debug this issue unless you tell us what error MySQL generated. And, what format you are attempting to insert. Post example SQL. Did you honestly think the world's most popular open source database would limit one insert statement at a time?

Note when you see someone say "SQL format, they mean ANSI SQL - standard SQL. Whatever DB you exported from should have an option for that which you can then import into MySQL. The fastest way is to shell into the daemon and use the source command.

-jim
 
the query tool i use is the one that comes in the GUI tools that is a separate download from the DB, its on the mysql site, you just have to download it separately.

The weird thing is, it doesn't error it just processes the first insert command, and then stops.

I have used the phpadmin tool before, but it is not nearly as nice as the GUI tools from MySql, i will look to see if the tool can just import a .sql file, i didn't even think about that. After years of just copy pasting the sql statements into the DB2 command editor, i just figured this would work the same.
 
Yep, import the .sql and you'll be set. phpMyAdmin is web based so it's very common in most cpanels and webhosting platforms, and of course Net accessible from anywhere. But for large databases nothing beats shelling into the daemon running on the server, create the database there, then "use <databasename>" then the "source" command to import a .sql file directly on the server. It's blazing fast, and that is my advice.

As to the GUI tools, I've never used it, sorry, but sounds like if you get the format correct, it'll work. But the way you've described it, it's not the best at reporting errors that humans can understand.

-jim
 
the query tool i use is the one that comes in the GUI tools that is a separate download from the DB, its on the mysql site, you just have to download it separately.

The weird thing is, it doesn't error it just processes the first insert command, and then stops.

I have used the phpadmin tool before, but it is not nearly as nice as the GUI tools from MySql, i will look to see if the tool can just import a .sql file, i didn't even think about that. After years of just copy pasting the sql statements into the DB2 command editor, i just figured this would work the same.

I personally use the command line to import files but its its not that large phpMyAdmin will work also. If you're looking for another app you can try this one.

http://www.sequelpro.com/
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.