In SIdora, MySQL is used to support Fedora. While there is no functional reason why the Fedora and Drupal databases cannot be co-located, it is recommended that in production separate databases be used since normally these products are running in separate execution environments, and the tuning is very different. This is a decision, however, that needs to be made based on local circumstances and is outside the scope of this article. There are too many options and alternatives for configuring a database so the following instructions should be considered a starting point that can be tailored for your specific needs.
Install MySQL. SIdora is tested with MySQL 5.6.31. Versions later than 5.1 should work but for production the latest Version 5.x is recommended. Other databases can be used notably PostgreSQL. MySQL is no longer being distributed with RHEL 7 so you will have to install from downloaded packages:
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root user! You likely will need to get the random password in
/root/.mysql_secretfirst. Start the server, then issue the following commands:
- Alternatively you can run
/usr/bin/mysql_secure_installationwhich will also give you the option of removing the test databases and anonymous user created by default. This is recommended for production servers. See the MySql manual for more instructions.
Create Database, Users and Privileges. We will create the databases needed for Fedora in the following operations. We will also create the users and permissions needed for Fedora.
If any services access the database remotely, permission for the client must be added to the database. Likely you should be more restrictive in production granting access to only a limited set of IP addresses:
There is no content with the specified labels