How to import XML into SQL Server database?

MySQL dump/import command

  • I am not interested in a collection of links to sites that offer all sorts of explanations of all the command line switches for doing this (I could find these myself). I want a researcher who knows the answer with confidence to respond to this question with brevity/clarity and most importantly, accuracy in mind. I have two MySQL databases located on a server somewhere. I connect via secure shell. I don't know all of the details about the configuration of this particular server but it obviously has MySQL installed/configured properly and you can assume that any other 'very likely' items would also be resident. I need to completley copy one database into the other (one is currently quite large, the second is empty). I know I have done dumps in the past with this sort of thing: mysqldump -u USER -pPASSWORD DATABASE > filename.sql so perhaps my primary question is how do I import this dump into the second database. I have had very little luck with the "mysqlimport" command - which the MySQL documentation states is for importing text files (which the sql dump seems to be) but it is not of simple delimitation (if thats a word). I should note that while the two databases exist on the same server the username/passwords for them are different. I ask because I am pressed for time and need to get this small detail out of the way and don't have time to play around with it. If your answer does the trick for me, you get the money and a good rating.

  • Answer:

    Hello, I manage a couple forums in MySQL which have different tables & data which need to be backed up and every now and again restored. Here's the simple command to restore the database using the file you dumped in the first step: mysql -u USER -p DBNAME < dump.sql You might have to make sure the database you're importing into is EMPTY because the import command listed above will not overwrite structures existing already. Use PHPMyAdmin or another set of delete/remove table commands to make sure the structures you're importing do not already exists in the database you're importing into. Other than that, it's simple as pie. Additional Links: http://www.he.net/faq/mysql.html#Anchor1020 Search Strategy: mysql dump restore on google: ://www.google.com/search?q=mysql+dump+restore Thank you for the opportunity to answer your question, if you require more information, please clarify the question, or if you find this answer satisfactory, please feel free to rate it. Thank you! skermit-ga

mork-ga at Google Answers Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.