newbe: how to import a whole db from an .sql file
| From: | steven | Date: | Thu, 21 Feb 2002 12:46:24 +0000 |
| Subject: | newbe: how to import a whole db from an .sql file | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-17124@lists.php.net to get a copy of this message | ||
I'm moving a mySQL db from my own server over to an external hosting
company. there I don't have any root access of course... so I log in the
mySQL-console.
I made a 'db-dump' of my mySQL db (with Webmin), so I've got a textfile with
a large amount of SQL-statements inside. (CREATE TABLE and INSERT INTO's)
I tried the usual connection to the db, and then:
@mysql_db_query('dbname', $myQ, $lid);
where $myQ is a string of the whole textfile. I get this error:
1064You have an error in your SQL syntax near '; INSERT INTO ISshipping
VALUES (8,'966637132','EWW','Emery Worldwide','EWW93' at
line 20
it seems as if the first sql-statement is ok, but the query command from php
can't handle multiple statements devided by the ';'...
How can I import the whole file?
tnx for any help!