Forum Moderators: bakedjake

Message Too Old, No Replies

Unix command help

how to export/import sql

         

kia0047

2:56 am on Oct 14, 2004 (gmt 0)

10+ Year Member



I have a forum site with a big database. The forum doesnot have a feature for me to do backup. I tried phpmyadmin to do backup but restoring the sql failed. i know i can use ssh to import the sql but forgotten all the unix command that i learnt many many years back. can anyone help me with the command for importing and exporting sql via ssh?
certainly, i have permission to access my server via ssh.
thanks

moltar

4:39 am on Oct 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



mysql -u USER -p PASSWORD DBNAME < dump.sql

kia0047

5:12 am on Oct 14, 2004 (gmt 0)

10+ Year Member



does not work.
what command should i enter? see encl. image"

[edited by: bakedjake at 6:37 pm (utc) on Oct. 14, 2004]
[edit reason] bzzt! no urls means no ips either. [/edit]

incywincy

5:47 am on Oct 14, 2004 (gmt 0)

10+ Year Member



shell> mysqldump --opt db_name > backup-file.sql

You can read the dump file back into the server with:

shell> mysql db_name < backup-file.sql

check out The MySQL Documentation [dev.mysql.com]

Kalashnikov

12:14 pm on Oct 14, 2004 (gmt 0)

10+ Year Member



let me correct you a little, Moltar:

mysql -u USER -pPASSWORD DBNAME < dump.sql
^^^ no space shoud be there