-
Notifications
You must be signed in to change notification settings - Fork 39
Using MySQL instead of SQLite
Advanced users may want to use MySQL instead of SQLite. This can be achieved fairly easily by manipulating some environment variables.
There are two ways to tell XBMC Video Server to use MySQL. Both ways are described below.
This is the preferred way if you run the application normally according to the installation instructions (i.e. no fancy custom setup).
- Copy the
.env.mysql.example
file to.env
. Modify the variables so they're correct for your installation. - Create an empty database for XBMC Video Server, e.g.
xbmc_video_server
. The name can be whatever you want, just make sure you modify theMYSQL_DATABASE
environment variable accordingly.
That's it, now you can run php ./src/protected/yiic.php createinitialdatabase
to create the necessary database tables, and when you use the application it will use MySQL instead of SQLite.
If you use e.g. Docker Compose, you might wanna specify the required environment variables in your docker-compose.yml
instead of messing around with .env files. You can see which environment variables are required by looking at the .env.mysql.example
file.