Gossamer Forum
Home : Products : Gossamer Links : Discussions :

SQL importing trouble

Quote Reply
SQL importing trouble
Hello

I am trying to import an sql back up file (contains structure and data) into my existing Mysql database..

I am using the statment:

mysqlimport --all-databases /path-to/backup.sql

and getting:

MySQL said: You have an error in your SQL syntax near 'mysqlimport --all-databases /path-to/backup.sql' at line 1.

Any suggestions?
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] SQL importing trouble In reply to
You could always use mysqlman :)

http://www.mysql.com/...m/y/mysqlimport.html
Quote Reply
Re: [katabd] SQL importing trouble In reply to
EDIT: Didnt see Pauls post until I posted. I got called away to do a job.

How large is your SQL database? If it is less than 100,000 links you shouldbe able to do what you are asking via MySQLMan.

Click on Database > MySQLMan > Launch MySQLMan > SQL Monitorand then select the database you want to dump into.

This is the way I do it, even with 200k + links in the database!

Hope it helps.


Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!

Last edited by:

AndyNewby: Jan 4, 2002, 2:45 AM
Quote Reply
Re: [katabd] SQL importing trouble In reply to
mysqlimport is a program, not an sql query. You run it from shell.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] SQL importing trouble In reply to
i alex



I have tried telnet using

mysqlimport --all-databases /path-to/backup.sql


Still getting the same error:

Any suggestions?
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] SQL importing trouble In reply to
Oops, misread the error. mysqlimport is for importing delimited text files. You have an sql dump. You want,

mysql database_name < database.sql

to run the sql queries contained in database.sql.

Cheers,

Alex
--
Gossamer Threads Inc.