Saturday, 31 May 2014

Drupal moving database from one server to another

So I wanted to get a site I've been making 'live' which meant transferring from the test server to the real one. How to do this? I remember in Joomla it was as easy as pie, not so with Drupal, although not too tough.

Basically:

  1. move all files
  2. move all tables from database
So, in myPHPadmin you can export, but I was coming up with an error:

Error

SQL query:
--
-- Database: `sitename_pw`
--
CREATE DATABASE IF NOT EXISTS `sitename_pw` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;

 
MySQL said: dot.gif
#1044 - Access denied for user 'my_user_name'@'localhost' to database 'sitename_pw'

So I found this website which explained that you have to export the tables within a database, rather then a whole database. To do this you have to be looking at the database tables, then press the export button to export just the tables.

Then when you import them, you have to be actually in the new database and press the import button

No comments:

Post a Comment