MySQL

From DreamFactory
Jump to: navigation, search

Set up MySQL

$ sudo yum install mysql-server
$ sudo apt-get install php5-mysqlnd mysql-server mysql-client

Regarding MySQL engines Older versions of MySQL default to using the MyISAM engine. This engine does not support foreign key relationships and is thus not compatible with DreamFactory. The InnoDB engine is recommended for DreamFactory. Here are some suggested settings related to InnoDB that you can put in your my.cnf file

default-storage-engine = InnoDB
innodb-file-per-table = 1
innodb_stats_on_metadata = 0
character-set-server = utf8
collation-server = utf8_general_ci

Note for CentOS 7

As of version 7 CentOS no longer includes MySQL in its repos. If you are using CentOS 7 you will need to install MySQL following these instructions here, or you can use MariaDB instead of MySQL. You will still need the mysql-client.

You need to create a database, and a DreamFactory user in your MySQL instance. On a fresh install, this is quite simple:

$ mysql -u root 

mysql> create database dreamfactory;
mysql> grant all privileges on dreamfactory.* to 'dsp_user'@'localhost' identified by 'dsp_user';
mysql> quit