#1
  1. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,650
    Rep Power
    171

    Duplicate database and its data from command line


    Hello;

    How can I do this properly?

    mysqldump -u behnam -p behnampassword h2g_database | mysql -u behnam backup -p behnampassword h2g_database_2;

    But as you see, this fails
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2012
    Location
    Wisconsin
    Posts
    78
    Rep Power
    3
    Originally Posted by zxcvbnm
    Hello;

    How can I do this properly?

    mysqldump -u behnam -p behnampassword h2g_database | mysql -u behnam backup -p behnampassword h2g_database_2;

    But as you see, this fails
    I don't normally use the command line but i believe you are not supposed to have a space between -p and password

    Code:
    mysqldump -u behnam -pbehnampassword h2g_database | mysql -u behnam backup -pbehnampassword h2g_database_2;
    otherwise do you get a error? if so what is it?

IMN logo majestic logo threadwatch logo seochat tools logo