Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2005

    Unanswered: How to copy Database to another server

    Hi guys! Help please. Say, I have 2 servers, one is my server that I used during my development and the other one is my client’s server. Say, I’m already done with my development and I want to copy the database from my server to my client’s server what is the best way to do this? I’ve already tried using the “mysqldump.exe” command from MySql Command Line and I was able to backup my database from my development server but when I try to restore it to my client’s server it gives me an error saying
    “ERROR 1049 (42000): Unknown database 'acr128demo”.
    I know the error is obvious but im just wondering if I could restore a dabatase to a server even if the database does not exist. Any help guys? by the way this is how i backup my database
    mysqldump.exe --add-drop-database -u root -p MyDBName > c:\Filename.mysql
    and restore it to my client's server
    mysql.exe -u root -p MyDBName < e:\Filename.mysql

  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    either create a db on the client machine called acr128demo
    or find if their is an option to set a target database
    or do the backup via mysql administrator where you cn then edit the database name.
    looking at the option in mysqldump you can output values to XML, so im guessing you can make changes to the XML file before loading the data into the target file.

    its probably quite likely that MySQL administrator uses mysqldump to do the dirty deed, adminsitrator creates a .SQL file which is editable by any ascii editor, allthough some may choke if the .sql file is fairly massive

    if none of thoise work the other alternative is to create a copy of the db in the new name within your test server
    then run mysqldump on the copy and use that as your feedstock on the live server.

    personally I don't like having different names between the live and test servers.. its just one more thing to test on deployment in the ive environment
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Jun 2007


    this error show that before importing the file you have not created database
    first create database import file

    or you can use Navigate tool for this purpose

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts