Configurate Database

The database configuration is quite small and straight forward. It is located with the rest of the applications configuration in /Application/Config and is expected to be namned Database.json.

This is default database configuration in ShellMVC. Worth to note is that a lot of fields are left blank. They need to be filled in with values regarding the database you intend to use.

  "Database": {
    "UseDatabase": true,
    "DatabaseType" : "PDO",
    "Provider" : "mysql",
    "Server" : "",
    "Database" : "",
    "Username" : "",
    "Password" : ""
Lets briefly go over the fields.

Can be either true or false. If set to false, the rest of the values is not of importance. If you don't intend to use a database this value must be set to false otherwise the application will run into an error when trying to connect to a database that doesn't exists.

Determines which internal database wrapper will be used. Currently the only supportet value is "PDO". This will initialize ShellMVC's PdoDatabase database provider internally, which uses PHP's built in PDO class for its communication.

Determines which provider PDO will use. For more information see PDO's own documentation (

Server to connect to. See your database for more information. If the database is located on the same machine, the localhost (or should suffice.

Database on the DBMS to use.

Username on the DBMS to connect as. Make sure the user has access from the host running your PHP site.

Password for the user.