MySQL

From FUDforum Wiki
Jump to: navigation, search

FUDforum provides out of the box support for MySQL databases.

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

  • mysql (prior to PHP 7)
  • mysqli (MySQL improved)
  • pdo_mysql (Portable Data Objects interface)

Privileges required

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.

External links

Supported database types

DB2 | CUBRID | Firebird | MySQL | PostgreSQL | Oracle | SQLite | SQL Server

Also see: FUDforum tables
Languages
Personal tools
This is a cached copy of the requested page, and may not be up to date.

Sorry! This site is experiencing technical difficulties.
Try waiting a few minutes and reloading.

(Can't contact the database server: Cannot return last error, no db connection)


You can try searching via Google in the meantime.
Note that their indexes of our content may be out of date.