Config DB

By default, Voila uses the SQLite database manager which stores the database in the project's SQLite folder.

If you prefer to use Mysql, you must create a database in your mysql.

If you have access to your database from the command line, with root user or with user benefiting from database creation profiles, just run the commands:

mysql -u root -p

And in mysql create your database and fill it with the mvcvoila_items.sql file for example.

Here is an example with the commands to run from the command line in mysql:

CREATE DATABASE my_voila_app;
USE my_voila_app;
SOURCE mvcvoila_items.sql;

Now, you have to configure the config/db.php file.

define('APP_DB', "sqlite");
// define('APP_DB', "mysql");

* This file define mysql BD access infos.

define('APP_DB_USER', 'user');
define('APP_DB_PWD', 'password');
define('APP_DB_HOST', 'localhost');
define('APP_DB_NAME', 'database_name');

* This section define sqlite access

define('APP_DB_PATH', __DIR__ . '/../SQLite/');

and you replace user, password and database_name with you local data for mysql

Don't forget to comment "define('APP_DB', "sqlite");" and uncomment "// define('APP_DB', "mysql");"

Let's try if it's working on your browser (don't forget to launch your web server)