MySQL - fudforum/FUDforum GitHub Wiki

FUDforum provides out of the box support for MySQL databases.

One of the following PHP drivers must be implemented to enable MySQL support:

  • mysqli (MySQL improved)
  • pdo_mysql (Portable Data Objects interface)

Create Database and Assign Privileges

Create a DB and user for your forum from phpMyAdmin or command line:

 CREATE IF NOT EXISTS DATABASE fuddb;
 CREATE USER 'fuduser'@'%' IDENTIFIED WITH mysql_native_password AS '***';
 GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES ON *.* TO 'fuduser'@'%';

Prevent external access to the DB

Edit /etc/my.cnf and configure one of the below methods to shield your database from external access:

Method 1 (binding SQL just to interface I/0):

 [mysqld]
 [...]
 bind-address=127.0.0.1

This will cause the daemon to just to listen on the loopback device, so no one in the network will have an idea that there's a daemon at all, because they are accessing the machine from a different interface (eth0, eth1 etc). Makes sense where SQL and httpd are hogging up the same machine.

Method 2 (disabling TCP/IP completely):

 [mysqld]
 [...]
 skip networking

Now SQL only listens on local unix sockets, a solution preferred over the first one, because it's always better to reduce the amount of services on a machine (even if they're running on loopback) since it makes it less vulnerable.

⚠️ **GitHub.com Fallback** ⚠️