Web Design Forum: Moving a MySQL database - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Moving a MySQL database Rate Topic: -----

#1 User is offline   dmpinder 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 431
  • Joined: 17-October 08
  • Reputation: 22
  • Gender:Male
  • Location:Glossop, Derbyshire, United Kingdom
  • Experience:Advanced
  • Area of Expertise:Designer/Coder

Posted 03 August 2009 - 08:55 PM

Hey everyone,

I'm hoping someone can help me with this problem I have.

I've been asked by a client to move a MySQL database from one server to another (different provider). I know very little PHP, and have barely used PHPmyadmin before.

Can you give me some guidance? I've Googled as usual but everything seems to be very technical MySQL command line stuff, which means very little to me. I'm a quick study, so I just need to be pointed in the right direction.

Many thanks

Darren
0

#2 User is offline   ElanMan 

  • In, out, shake it all about...
  • PipPipPipPipPip
  • View gallery
  • Group: Members
  • Posts: 3,298
  • Joined: 11-March 08
  • Reputation: 54
  • Gender:Male
  • Location:Darlington
  • Experience:Nothing
  • Area of Expertise:Nothing

Posted 03 August 2009 - 09:31 PM

If both servers are using phpMyAdmin, export the database as a .sql file leaving the default settings. Tick the checkbox 'save as file'. This will save it to your computer.
Go to the new server/phpMyAdmin and create a database with the same name as the original. Import the .sql file from your computer. The import and export links are at the top of the page in phpMyAdmin.
Any probs, give us a shout :)
0

#3 User is offline   Faevilangel 

  • Wordpress Ninja.....
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,166
  • Joined: 11-May 09
  • Reputation: 57
  • Gender:Male
  • Experience:Advanced
  • Area of Expertise:Web Developer

Posted 03 August 2009 - 09:38 PM

as elan said its easy as using export / import from phpmyadmin

if the servers don't have that then you could install phpminiadmin
0

#4 User is offline   dmpinder 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 431
  • Joined: 17-October 08
  • Reputation: 22
  • Gender:Male
  • Location:Glossop, Derbyshire, United Kingdom
  • Experience:Advanced
  • Area of Expertise:Designer/Coder

Posted 03 August 2009 - 09:59 PM

ElanMan,

You're a life saver, that sounds so simple.

I'm assuming that when I FTP all the public HTML files from the old server and onto the new server, once I have the database in place (same name, as you point out), it should just instantly work like it did on the previous server? Is there any messing around with config files to make sure the PHP files link to the database properly?

Darren
0

#5 User is offline   ElanMan 

  • In, out, shake it all about...
  • PipPipPipPipPip
  • View gallery
  • Group: Members
  • Posts: 3,298
  • Joined: 11-March 08
  • Reputation: 54
  • Gender:Male
  • Location:Darlington
  • Experience:Nothing
  • Area of Expertise:Nothing

Posted 03 August 2009 - 10:22 PM

Just make sure your connection script uses the same details i.e.
DEFINE ('DB_USER', 'username'); 
DEFINE ('DB_PASSWORD', 'password'); 
DEFINE ('DB_HOST', 'localhost'); 
DEFINE ('DB_NAME', 'database');

and you should be fine.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users