• 27
  • Sep

To export a database run

mysqldump datbasename > databasename.sql

This will export the database to databasename.sql

To import a database from an sql dump file run

mysql databasename < dumpsqlfilename.sql

This will import the sql file into the database. Once imported you should check to make sure it was correctly imported to do this run

mysql databasename
show tables;

If the you do not see any tables listed then the sql file likely has a USE statement at the top. Edit the sql file with a text editor and comment out the line “USE databasename”. Once commented out attempt to import the data and check the tablesl.

Share this site! Click on the a link below: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Slashdot
  • De.lirio.us
  • Technorati
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists
  • blogmarks
  • YahooMyWeb
  • BlogMemes
  • Book.mark.hu
  • Bumpzee
  • Fleck
  • Furl
  • IndianPad
  • Netscape
  • Reddit
  • Spurl
  • blogtercimlap
  • Gwar
  • connotea
  • DotNetKicks
  • Fark
  • SphereIt

» You can leave a comment, or trackback from your own site.

Leave a Comment