I Can't Import A Database?


Error message:


SQL query:

– phpMyAdmin SQL Dump
– version

– Host: xxx.xxx.xxxx.com
– Generation Time: Jul 30, 2006 at 05:02 PM
– Server version: 4.1.14
– PHP Version: 4.4.2

– Database: xxxx


MySQL said: Documentation
#1044 - Access denied for user ‘xxxx’@‘xx.xxx.xx.x/xxx.xxx.xxx.x’ to database ‘xxxxxx’

Heres the background. I just reg’d a new domain. (I wanted to rename my forum.) I know, I can just redirect, or mirror. But I don’t want to do that. My current forum is running a modded phpBB. I want to run different software for the new forum, but I need to keep the old database (for obvious reasons…users, posts, etc.)

I need to import the MySQL database to the new host, (everything is still on Dreamhost…so far) in order to do the conversions, test everything, etc, without screwing up the database of the active forum. But I can’t! I’ve searched other posts, and I get “can’t be done, DH doesn’t allow it…” as well as “follow this wiki, use ssh, use phpMy Admin…blah blah blah” Nothing works.

If I’m missing something, tell me. Otherwise adding this to the several outages the last month, this is my cue to leave, as I’m sure some other hosting site will let me import a simple mysql db.


When you use phpbb to make a database backup it assume you’ll be using phpbb to restore the databse in a different enviroment than DH. Basically it’s assuming you’ve moved or had data loss and wants to create a new database for you and then put all the data in it. However as you’ve read you’re not allowed to do that here at DH. All new databases must go through the panel.

You’ve two options to fix this problem - they’ll both work out the same so just pick the one that sounds easiest to you and go with it.

  1. open the sql backup you have with a simple text editor. Towards the top you’ll see where it’s creating the new database. Fear not, phpbb puts in comments all over the place so it should be fairly easy to find. Remove that part. The file should start off just filling the data. Now save, re-upload and import the data again, with a little bit of luck it will go through.

  2. log into your server via ssh and make a new sql dump of your data, and then fill it into the new database. Since you said it’s all still here at DH this should be a fairly quick method. See the wiki article on SSH for help loging on. Now dump your data to a file (this command is all one line):
    mysqldump --opt -u[b[user[/b] -ppassowrd -hhost.domain.com dbname > forum.sql

Now import it (one line again)
mysql -u[b[user[/b] -ppassowrd -hhost.domain.com dbname < forum.sql

Now as long as that’s gone though you can remove the forum.sql file if you want:
rm forum.sql
The wiki article Migrate Mysql can explan this process in a little more deatil if you’d like.

I think that should set you up. Post back if you’ve any more issues.

art.googlies.net - personal website