Page 1 of 1

Problems moving phpbb to new host

Posted: Thu Apr 21, 2011 3:19 pm
by aleingang
Hi,

I'm following the instructions in the KB article and using BigDump:
http://www.phpbb.com/kb/article/transfe ... or-domain/

After I click on the "start import" link on the first page that shows up when I go to the BigDump.php file on my server I get the following error:

Code: Select all

Error at the line 20: CREATE DATABASE `sufubuckbb3new`;
Query: --
--
--
CREATE DATABASE `sufubuckbb3new`;
MySQL: Access denied for user 'aleingan_phpbb3'@'localhost' to database 'sufubuckbb3new'

The original DB name on the old server is the same, but the username is different - is that a problem?
It doesn't say anything about matching login info between the old and new DBs in the KB article that I can find.

Help!

Re: Problems moving phpbb to new host

Posted: Thu Apr 21, 2011 3:29 pm
by Pit$Bull
You will be required to use the correct info for the new database.

Re: Problems moving phpbb to new host

Posted: Thu Apr 21, 2011 5:43 pm
by aleingang
Thanks.
Can you be a little more specific?

I created a new database on the new host's server and then put the info for that into the "Database configuration" section of the bigdump.php file. Is that correct?

Does it matter that the username that's set up for the old database is different from the one I"m using on the new one? I can't use the same username on both because the new host automatically adds a prefix to the username. Is that a problem?

Re: Problems moving phpbb to new host

Posted: Thu Apr 21, 2011 5:47 pm
by Brf
As you can see from your error message, the SQL you are importing is trying to create the database. You would just need to give your database user permissions to create that database, or remove that line from the import.

Re: Problems moving phpbb to new host

Posted: Thu Apr 21, 2011 6:12 pm
by aleingang
Thanks.

So we're talking about the new database? I gave the user I created for the new DB all Privileges - is that what you're talking about?

I'm new to all of this so please treat me like a drooling idiot and walk me through it step by step.

Re: Problems moving phpbb to new host

Posted: Thu Apr 21, 2011 6:16 pm
by Brf
Certainly the error is for the new database. The old one is not even on this server. You could not have an error message for a database on a different server.

You said you already created the database.

The error message is on a "CREATE DATABASE" command.

Therefore, you either have to delete the new database and give your database user permissions to create it, or you need to remove the CREATE DATABASE command from the import.

Re: Problems moving phpbb to new host

Posted: Thu Apr 21, 2011 6:45 pm
by aleingang
OK - how do I do those things?

Remember - drooling idiot.

I tried:
Deleting the name of the DB from bigdump.php and I got an error

Then I tried putting the DB name back in to bigdump.php but deleting the DB with that name that I had created using MYSQL Database Wizard. Error.

Step by step?

Re: Problems moving phpbb to new host

Posted: Thu Apr 21, 2011 11:47 pm
by aleingang
Can anyone tell me how I would:
delete the new database and give your database user permissions to create it, or you need to remove the CREATE DATABASE command from the import.
I'm stuck and clueless.

Re: Problems moving phpbb to new host

Posted: Fri Apr 22, 2011 7:50 am
by hxd
Open the database dump with a file editor (e.g. Notepad) and delete the line:

Code: Select all

CREATE DATABASE `sufubuckbb3new`;
Save the change and import the dump in an empty database.

Re: Problems moving phpbb to new host

Posted: Fri Apr 22, 2011 1:53 pm
by aleingang
OK - I'm drowning in my own drool over here.

I don't know what "the database dump" is - are you talking about the bigdump.php file? The only place CREATE DATABASE occurs in that file is here:

Code: Select all

// $comment[]='CREATE DATABASE';      // Uncomment this line if your dump contains create database queries in order to ignore them
I have the bigdump.php file and the Gzipped archive of my original database.

Any theories on why I'm having this problem? - it isn't mentioned in the KB article.

Re: Problems moving phpbb to new host

Posted: Fri Apr 22, 2011 6:31 pm
by aleingang
Bump!

Can anybody help me with this?

Re: Problems moving phpbb to new host

Posted: Sat Apr 23, 2011 1:57 pm
by aleingang
OK - half-thanks to the people on here who abandoned me halfway through the problem - I was able to figure this out.

I unzipped the .sgl.gz archive of my original database and found this line

Code: Select all

CREATE DATABASE `sufubuckbb3new`;
and deleted it. This gave me a new error when I tried to run it because Bigdump was using the info in the .sql file to determine what database to dump into (I think) and my new database has a different name.

The line after the CREATE DATABASE line that I deleted was

Code: Select all

USE sufubuckbb3new;
and I changed it to match the name of the new database on the new host's server:

Code: Select all

USE aleingan_sufubuckbb3new;
re-uploaded the .sql file into the "dump" folder and re-ran bigdump.php and it worked.

I don't understand why I had this problem in the first place - if it's something that's likely to happen to anyone else I'd suggest that the KB article be edited to include this info.