You are invited to Log in or Register a free Frihost Account!

Importing an existing database...

Pretty much what I am trying to do is to transplant an existing SQL database from an inferior 100webspace host to a new superior frihost host. I have file copied all the phpbb files to the new frihost and now I am trying to get away with transplanting the database over here too. I have exported the database to a hard location on my hard drive and now i'm trying to snap it into the new one here. I realize that even when I get the database moved over I might need to tell phpbb the new location. Help from any guru would be appreciated!

Again... my hats of to this venture... Bondings is my new hero!

I have sucessfully imported the database 'I believe' because I see it in mySQL however I still recieve the critical error: can't connect to database, I was reading previous posts and read Gonzo say that I needed to alter the config.php file ... I believe this is where my error falls. is my account is the problem forum


Well, I am not a passive person so I've been looking on my own and I drug this up from PHPbb's official page:

If you have a MODded phpBB, that means you edited the files, and there also may have been SQL changes. If you want to move your present forums, in its exact state, to a different host, it's pretty easy.
You should first make sure you have the exact same phpBB files on your computer as the ones stored on your host. If you're not sure they are, download them to your computer via your favorite FTP client. Then, backup your phpBB forums if you haven't already. You can do this through the Administration Control Panel > Backup Database. Make sure you back up structure AND data.
Before you upload your phpBB files, you'll have to open the config.php in your favorite text editor, such as NotePad. Open it up, find all of the variable data fields, and change them to the values that apply to your new server. When you're finished save and close.
Now, you'll have to upload the phpBB files, the ones that you used at your old server, to your new one.
Before you start restoring your database, you should make sure your backup is less than 1MB or about. If it's more, it may be too large to upload at once, and you'll have to break it down into chunks. To do this, open up your *.sql backup file, and find anywhere with a ; (semi-color). You can choose to break up the file after this, create a new document, copy and paste. Now you have two chunks of files, both about or smaller than 1MB.
Once you're finished uploading the phpBB files, go into phpMyAdmin (or whatever your SQL management tool is) on your NEW host, and choose to "run a query from a textfile." Click on "browse" and find the *.sql backup file you've backed up. This backup file does not need to be uploaded to your site at all; it can be stored locally on your computer, as it probably is already. Click "GO" and wait for it to finish uploading. If all went well, you can go to your site and log in, and everything will be back to normal. Your MODs will remain intact, and the forum will still work as you backed up ALL of it.
You're done! Now, if you want to upgrade your forum, you'll have to follow one of the upgrade paths.

We'll zoom to this point of the tutorial:

Before you upload your phpBB files, you'll have to open the config.php in your favorite text editor, such as NotePad. Open it up, find all of the variable data fields, and change them to the values that apply to your new server. When you're finished save and close.

heres what my old config.php says:


// phpBB 2.x auto-generated config file
// Do not change anything in this file!

$dbms = 'mysql';

$dbhost = '';
$dbname = 'stecar11_xeon';
$dbuser = 'stecar11_xeon';
$dbpasswd = '*excluded*';

$table_prefix = 'phpbb_';

define('PHPBB_INSTALLED', true);


What would I need to change these entries to?
All other steps are completed ... I just need to fix these entries *i believe*
OK I won't assume anything, and start from the beginning.
You'll first need to create a mysql database in your cPanel.
This icon -

First you create a database then a user and then you assign all privileges on the created database to this user (and also restore your old database backup here).
Now you have all the information you need to enter in config.php

you need to change the values as -
$dbhost = 'localhost';
$dbname = 'databasename'; //(which you created)
$dbuser = 'databaseuser'; //(which you created)
$dbpasswd = '*excluded*'; //(you should know)

If you enter xyz as the database name when creating a new database, the database name is abc_xyz where abc is your cPanel username.
(That's why your existing database name reads stecar11_xeon)
The same is holds good with database user
Just to add that the database name should be something like "xeononyx_????", which is most likely your cpanel name.

Please try this out. If it still doesn't work, I'll try to help you a bit with it.
Thank you all ... I've been whittling away at this for a while and pictures will speak a thousand words for me ... so here we go:

Now as a side note: They way I change it is I save the file as config.phx on my hard drive then click and drag it over into the ftp then change the extension to .php

Unfortunately, I am still not able to connect I am sure my settings are incorrect, hopefully these pictures will tell the tale.

And again, thank you for your assistance.


OK hehe ... i got it to work but I think I need to fix some file folder problems.. are file folders case sensitive?

btw: thank you for brainstorming with me, i ended up axing my databases and trying again using your instructions and ouila ... it connected.


all problems solved! Thank you mOrpheuS, and Bondings your help did the trick!
XeononyX wrote:
Thank you all ...
so here we go:
Now as a side note:
thank you
OK hehe ...
btw: thank you
all problems solved!

Did we miss something ? Shocked

anyways, I'm glad it all worked out.
Resolved and -locked-
Related topics
Windows Vista Official Thread
CMS and forum integration using DirectAdmin
SMF install: Unable to connect to FTP server
Could this be installed ?
BOT prevention - stand out from the crowd
Mysql datas gone!
Installing forum to DirectAdmin
Django or turbogears?
Connecting my domain to FriHost
MySql or MsSql?
SQL Injection
whats wrong with this mysql query?
Database transfer
This topic is locked: you cannot edit posts or make replies.    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

© 2005-2011 Frihost, forums powered by phpBB.