Page 1 of 1
tranfering databases from phpMyAdmin between servers
Posted: Sat Sep 07, 2002 8:23 pm
by m3mn0n
I have just got a new webhost and i do not want to loose all my contents of my forum database and translation database.
I did a google search for tranfering databases in phpMyAdmin and this is all i got:
Transfering databases via
browser might not be the best idea, anyway.
On origin server:
mysqldump dbname > dbname.sql
On target server:
ftp dbname.sql to a local directory on the target;
mysqladmin create dbname
cat dbname.sql | mysql dbname
Can anyone elaborate on this? Some newbie friendly instructions would be much apriciated.
Posted: Sun Sep 08, 2002 1:04 am
by Takuma
I think you just need to back up the database. Which is what the tutorial suggested. Creating back up SQL query.
Good tutorial here:-
http://www.mysql.com/doc/en/Backup.html
Posted: Sun Sep 08, 2002 4:27 am
by m3mn0n
thx alot, i'm too tired to do it now, but when i get to it, i hope it works!
*adds into favorites*

Posted: Sun Sep 08, 2002 10:09 am
by gite_ashish
hi,
If u have ssh, telnet access to u r server, then u can try this:
Go into the directory where u store u r database files.
This location can be found from the mysql startup script, on red hat linux 6.x/7.x it is "/etc/rc.d/init.d/mysql".
See the value of variable named "datadir" -OR- search for string like "--datadir=$datadir".
From this above found directory do:
tar czvf urdb.tgz *
This should create the file "urdb.tgz"
Then ftp/sftp/scp u r tgz file into u r new server.
Find the new server's mysql's database storage location, as above.
And then extract the copyed file:
tar xzvf urdb.tgz
Will create all the data structure on new server !
Posted: Sun Sep 08, 2002 12:29 pm
by Takuma
Grrhhh, I can't try your way cos I haven't got Linux!!!!

Posted: Sun Sep 08, 2002 1:58 pm
by MattF
In phpMyAdmin just log into your database and go to your database's front page where it has the table list, on the database dump area select all tables choose data and structure and send as file (these vary between versions), then click OK and you should be prompted to download a file. Save this file then go to your new host and upload the file on the front page of your database where the table listings are, either that or open the file and copy and paste the data into the textarea.
Posted: Sun Sep 08, 2002 1:59 pm
by Takuma
Thought phpMyAdmin had an backup thing
Posted: Sun Sep 08, 2002 2:25 pm
by MattF
It does, that's what I was referring to, the "database dump" dumps all the data from the database into a file that can then be uploaded to a different server or the same one in case of a server crash.
Posted: Sun Sep 08, 2002 2:29 pm
by Takuma
That's what I mean to I missed out "," etc.
I though phpMyAdmin had an backup thing... Thanks for reminding me.