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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Connecting SS to a MYSQL database


Reply


5 Posts   1761 Views

Avatar
Hiren

Community Member, 3 Posts

7 September 2010 at 2:39pm

Hi there,

I am a SilverStripe newbie, just herd of this Control management system a few weeks ago. Anyway my question is this

I have this database which uses MYSQL, and I was wondering how I could connect it with SilverStripe. I've been playing around in Silverstripe CMS but haven't seen any thing that looks useful.

Any help would be appreciated.

Avatar
Willr

Forum Moderator, 5513 Posts

7 September 2010 at 5:13pm

Welcome to the SilverStripe forums!

So the question is what is this mysql database? is it empty and you want to store your SilverStripe site in it? Then simply run the installer on your webserver. The installer will ask for your mysql username, host, password and database name. Once you enter those details and the installer is green then you can install and SilverStripe will write the configs and settings for you.

If the database you want to connect to is an existing database (eg a Wordpress database) then you cannot use that within SilverStripe easily. You will need 1 SilverStripe MySQL database then convert your content from the other one into this one.

Avatar
Hiren

Community Member, 3 Posts

8 September 2010 at 4:42pm

Hi there thanks for the reply.

The database is not empty it has been made with MYSQL. I have installed silverstripe and MYSQL using this tutorial

http://php.opensourcecms.com/news/details.php?newsid=585&title=Installing+SilverStripe+on+Windows+now+easier+thanks+to+Microsoft+Web+Platform+Installer

which tells you to install MYSQL first, and then use the silverstripe WebPI. So that is where I am at.

So would I need need to re-make the database with Silverstripe from scratch, or is there way I can connect the silverstripe with the database?

Avatar
N3mA

Community Member, 3 Posts

6 September 2012 at 7:32pm

Hi,

I am a SilverStripe newbie. I am working with a project which has a database in mysql and they use silverstripe. I want to run a project on localhost but have a problem with connecting the database.

My question is, how can I connect current database with silverstripe and run the project?

Thanks in advance!

Attached Files
Avatar
Willr

Forum Moderator, 5513 Posts

7 September 2012 at 9:38pm

N3MA - if you want to run the project locally, make sure you have mysql setup locally and that the database connection details are correct.

Hiren - Create your database in MySQL then put the connection details (db name, db server, user and password) in the SilverStripe install page.