Forum Moderators: coopster & phranque

Message Too Old, No Replies

mysql dump

mysqlimport?

         

madcat

7:07 pm on Feb 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hey-

I've saved a database table (contents and structure) as an .sql file via phpmyadmin. This table was in a local database on my machine, but I need it moved to a remote server now. Should I use mysqlimport to import the .sql file into the remote database? I'm missing how to write the correct syntax at the telnet command line. Any nudges in the right direction are appreciated!

M

jatar_k

7:23 pm on Feb 6, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



this is the syntax here
[mysql.com...]

the_Eych

7:27 pm on Feb 6, 2003 (gmt 0)

10+ Year Member



Greetings, madcat.

You can use phpmyadmin on the remote machine as well and just copy/paste the contents of your sql file in the SQL field in phpmyadmin and then execute it.

Though if you have exported a large database, then you might also consider using MySQL directly. You can type something like this in the shell:


mysql -uuser_name -p database_name < yourfile.sql

Nick_W

7:27 pm on Feb 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you can ssh onto the server just fire up mysql and type:

> source ~/path/to/db.sql

Nick

madcat

7:58 pm on Feb 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks for all your help!

> source ~/path/to/db.sql

>> I wish it came across that easy in the manual. It's a bit daunting to the untrained eye.

M

Nick_W

8:33 pm on Feb 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, I think there's a call for a "simplified manual" or cookbook website. Unfortunately I don't have the time or expertise to start it! ;)

Nick