Page 1 of 1

Solved: Problem with move to new server

Posted: Mon Feb 23, 2009 7:30 pm
by JonasBang
Hi,

So, I've changed web provider, and need to move my blog to the new server.

First I tried to export / import the database using phpMyAdmin. But I got error #1044 when trying to import.

Then I just installed a fresh install on the new server, and imported the data using Serendipity admin panel. I had to do some manual stuff, but I got it up and running.

Now I found out, that the database ID of the entries on the new server are not equal to the old. This results in 2 major problems:

1) I can no longer refer to the blog entry using an already hardcoded link from another application. This need to work exactly as on the old server, otherwise I have a huge update task to do in that other application.

2) All comments are not referring to the proper blog entry anymore. They refer to a random entry it seems. Might be because the entries no longer have the same ID. Huge update task if I have to correct this by hand.

So, as I see it, I need to do a phpMyAdmin export / import. I just tried that using these instructions: http://www.s9y.org/198.html. When importing I get error:
#1044 - Access denied for user 'JonasBa_admin'@'%' to database 'tidende_db_02'

'JonasBa_admin' is the dba of the new database, he has all rights.
'tidende_db_02' is the db name of the old database.

Is it because the name of the db and/or dba has to be the same? I tried to match it as good as possible, but because of prefixes I haven't been able to match it, so I don't hope that is the problem.

I need help here, my blog is down.

Br,
Jonas

Re: Help: Problem with move to new server

Posted: Mon Feb 23, 2009 8:39 pm
by JonasBang
Solved 8)

After more Google searches than expected, I found the answer:

1. Export
2. Unzip
3. Edit the .sql file
4. Remove those 2 lines from the .sql file:
CREATE DATABASE `your_database_name` DEFAULT CHARACTER SET latin1 COLLATE latin1_general_ci;
USE your_database_name;
5. Zip
6. Import

Reason for removing the 2 lines:

The first line (CREATE ...) attempt to create a database, but you do not have global CREATE privileges that permit you to create arbitrary databases. And, you have also already created the database using your providers web interface, so no reason to create yet one more.
The second line (USE ...) set your just created database active. Well, since we did not create one, we should not set it active either.

Br,
Jonas

Re: Solved: Problem with move to new server

Posted: Mon Feb 23, 2009 8:50 pm
by judebert
Just what I was about to say. ;)

Glad you found it! Let us know if you have any other questions.