Jump to:

4873 Posts in 7260 Topics by 1471 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » Installing Silverstripe Database

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

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

Page: 1
Go to End
Author Topic: 2443 Views
  • steve_nyhof
    Avatar
    Community Member
    224 Posts

    Installing Silverstripe Database Link to this post

    Is it possible to have silverstripe add the database from the install?

    In other words, without setting up the mysql database first, can silverstripe add and setup the mysql database from the SS install?

  • Sean
    Avatar
    Forum Moderator
    921 Posts

    Re: Installing Silverstripe Database Link to this post

    Yes, it already creates the database automatically providing the database credentials you provide have access to add the database.

    Sean

  • steve_nyhof
    Avatar
    Community Member
    224 Posts

    Re: Installing Silverstripe Database Link to this post

    Could you expound on that a bit?

    If a db does not exist in cPanel - silverstripe can create one from the install?

    When I enter the details into the install form fields, what exactly would have to be "in place" to make this work?

    Thank you,
    Steve

  • Sean
    Avatar
    Forum Moderator
    921 Posts

    Re: Installing Silverstripe Database Link to this post

    If SilverStripe can create the database it will, just type a database name into the configuration details in the installer.

    If it can't create one, there'll be an error, but only in the event that it doesn't have permission to do so. If it all went fine and was able to create a database, then there won't be any error.

    Sean

  • TotalNet
    Avatar
    Community Member
    181 Posts

    Re: Installing Silverstripe Database Link to this post

    Specifically, the user credentials you provide for connecting to the database in _config.php must have "create database" privileges on the database server.

  • steve_nyhof
    Avatar
    Community Member
    224 Posts

    Re: Installing Silverstripe Database Link to this post

    I have a support ticket into my host. I have a server with cPanel (WHM) and have looked for what I might need to be setup. But you are also saying that I need to setup "create database" privileges on the database server. Can you show me the line (of code) in the _config.php file that you enter to make this work?

  • TotalNet
    Avatar
    Community Member
    181 Posts

    Re: Installing Silverstripe Database Link to this post

    It's not quite as involved as that.

    in _config.php you set up your database connection, assuming you are using MySQL it will look something like:

    $databaseConfig = array(
    "type" => "MySQLDatabase",
    "server" => "localhost",
    "username" => "mydbuser",
    "password" => "password",
    "database" => "mysite",
    );

    You don't change anything here, however, "mydbuser" needs to be allowed to create a database on your MySQL server.

    Unless you are are setting up many different CMS installations it's probably easier (and more secure) to create a database manually, if you are setting up several then you'd be better off writing your own installation script and not use install.php at all.

  • steve_nyhof
    Avatar
    Community Member
    224 Posts

    Re: Installing Silverstripe Database Link to this post

    Thank you for the info, this is very helpful. I will get this to my programmer. We will be setting up 1000's of sites a year so I want a faster way, and remove what steps I can. Currently it takes about 3-1/2 minutes to setup a site and give access to the user, I want to cut that time down.

    Thank you again
    Steve

    2443 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.