Creating a Database
Now that you've created a website for your
example.com PHP application, you need to connect it to a database.
Creating the database
sympl create database example
to create a database using the Sympl Command Line.
Make a note of the password for later.
This creates a database named
example, along with a user of the same name with full access to only that database, and outputs the password. The password is also saved in a files with restricted access in the
/home/sympl directory for future reference.
Configuring your application
Now add the database credentials to one your application's configuration files. This will vary depending on your application, so consult it's own documentation.
For our example, the values we need are:
- Password: (the password you made a note of earlier)
Common places to find this configuration file in your PHP application are: