cancel
Showing results for 
Search instead for 
Did you mean: 

Database help

plantsman
Grafter
Posts: 36
Registered: ‎23-04-2008

Database help

Hi,  can anyone guide me to help on how to set up a second database in mysql.  I have one already running a SMF forum and would like a second one for testing forum aspects without interfering with my existing one. I have limited knowledge of mysql and ccgi beyond the stting up of my SMF 2.0.2 forum.
Any help is  much appreciated.
2 REPLIES
Superuser
Superuser
Posts: 9,869
Thanks: 1,227
Fixes: 71
Registered: ‎06-04-2007

Re: Database help

Assuming you are referring to the webspace included with certain legacy accounts then only one MySQL database is allowed and provided.
However you can still achieve what you described, just use a different table prefix when creating the set of tables for the second SMF installation. When you installed your first copy of SMF you will have created a Settings.php file which includes the line "$db_prefix = 'smf_';. For your second installation if that is changed to "$db_prefix = 'smf2_';" the tables created will not interfere with the first installation.
If you used the installation dialogue to create the Settings.php file one of the questions to be answered is to give the required Database prefix. Just ensure you specify smf2_  . Since you are using the same database the database name, user and password information will be the same as before.
David
plantsman
Grafter
Posts: 36
Registered: ‎23-04-2008

Re: Database help

spraxyt - thank you for your clear instructions. I can now see my way to creating a test forum. The database prefix smf2 was the key point that I wasn't aware of.