Jump to content

Recommended Posts

Posted

I have a forum with 50M database, and i have just change my server hosting.

But i don't want to restore database from PHP MyAdmin because it's very slow...

So, i try find another way. But i have some problem with that.

I test on localhost, and it work very well. But i can't do that with my host...

I use MySQL to restore database by run C:\mysql\bin\mysql.exe

and type: connect dbname localhost

then type: source dbrestore.sql to run.

But i can't do with my host...

Anyone help me...?

If another better way please tell me !


Posted

Quite often the access to a MySQL database is restricted, so you can test on localhost but can not access a remote host. In these cases phpMyAdmin is often the only choice, however as you say it can be slow on dumping quite large databases.

If you hav SSH access to your new host go there and once you have access

mysqldump -hxxxx.xxx.xx.xx -uxxxxx -pxxxxx databasename >dump.sql

The xxxxx are required host, username and password obtainable from your hosting provider, replace these with yours, the databasename obviously is your database name the >dump.sql is a redirect pipe to a file called dump.sql

In short this dumps out your database (in a few seconds) you can then download this dump.sql file by ftp.

To get access use the putty client, you can download it here

http://www.chiark.greenend.org.uk/~sgtatha...y/download.html

Posted

You need to contact your host and ask them if they allow SSH access, some hosts don't. If they do you need to get the password. Download putty and do as before. If not then you may well have to use phpmyadmin.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...