Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Confused - can't access my own database


Go to End


1661 Views

Avatar
clauer

Community Member, 12 Posts

14 November 2010 at 8:41am

Hi,

for testing and development reasons I installed Silverstripe into two different folders beneath htdocs ("silverstripe" and later "wsk". I ran the installation procedures in both folders and assigned in the "silverstripe" folder the default "ss_mysite" database and in the "wsk" folder one named "wsk". Both databases have been created by mysql as expected.

Now when working with the "wsk" installation where the "wsk" database is properly assigned in the _config.php in the mysite folder all changes Silverstripe is doing in the database are going to the "ss_mysite" database which is rather confusing. So I looked in the Silverstripe files for "ss_mysite" and found it in "wsk/saphire/dev/install/DatabaseAdapterRegistry.php line 31:'default'=>'SS_mysite' and in wsk/saphire/_register_database.php line 47:'default'=>'SS_mysite'. And in no other place.

So I changed the database name for the "silverstripe" installation to "test_mysite" (in _config.php) and renamed the database in the mysql folder. When loading the "wsk" site after a little while I found a fresh database named "ss_mysite" which was created and used by the "wsk" site. That's even more confusing.

Has anyone an Idea what causes this problem and what I can do to get over it? Thanks for any help! Changing it in the two file where the database is referenced seams not to be best practice.

Regards
Chris