MySQL

MySQL is a popular, free software relational database management system. It is often used in conjunction with web applications (such as many PHP sites), but has gained many more enterprise-level features since its start in 1994. An alternative fork is MariaDB.

Installation
Before installing, carefully consider the USE flags that influence the package deployment and features. The following table gives an overview of the package' supported USE flags:

Once the proper USE flags have been set, install :

To have the database(s) started automatically at boot, add the mysql init script to the default runlevel:

After configuring the database(s) - which is mentioned later in this document - start the mysql service:

Preliminary configuration
The package handles the preliminary setup of MySQL through the   option:

This will create a database, set proper permissions on it and assist in creating a good  password (this is for the MySQL   account, which is not related to the Linux   account).

To purge anonymous users and test databases from the installation, run  after the preliminary setup:

In-database configuration
When the database is up and running, connect to it using the mysql client application.

From this point, a session to the MySQL instance is open, allowing for queries and administrative commands to be serviced.

Connecting to MySQL
Connection to MySQL database is possible through MySQL ODBC driver

Select Devart ODBC Driver for MySQL and click Finish. Then you will be suggested to configure the driver. Two connection modes are available: using client library and Direct. Direct Mode is used for direct connection to a data source via TCP\IP avoiding client software. Some of the connection options are available in Direct Mode and not required when using client software. Mysql ODBC Connection String
 * 1.After the driver is installed, it can be configured. For this, in the Control Panel open Administrative Tools and find the Data Sources (ODBC) tool
 * 2.Now you have to add the Devart ODBC Driver for MySQL to the list of System Data Sources or User Data Sources or File Data Sources using the ODBC Data Source Administrator dialog.
 * 3.For this, click the Add button - the Create New Data Source dialog will appear with a list of available drivers.
 * 4.To activate the driver via ODBC Administrator, refer to the Product Registration article for more details.
 * 5.In the appeared connection dialog, you can set the connection options.
 * 6.Then you can click OK and finish configuration or switch to the Advanced settings tab to specify more detailed Connection String. See the full list of supported connection string options in the Connection Options article.

Login Prompt=False;User ID=root;Password=root;Data Source=localhost;Database=test

Erasing command history
By default MySQL logs every action, including leaving plain text passwords in its history file.

To remove the history file:

Alternatively you can permanently disable history logging with the following:

External resources

 * Official MySQL Community Edition documentation