MySQL is an open source database server. When used in conjunction with PHP scripts, powerful and dynamic server-side applications can be created. MySQL server administration is performed using phpMyAdmin and The Uniform Server’s integrated utilities. This page covers the MySQL UniController menu.
Note: With the appropriate module (plugin), you can run either MySQL or MariaDB server. These are equivalent; UniController text adapts to the plugin installed. This documentation makes no distinction and refers to MySQL. While reading this documentation, interchange MySQL and MariaDB as appropriate.
Change MySQL port
The Change MySQL port menu allows you to specify the MySQL port (standard port: 3306).
Change MySQL port
MySQL > Change MySQL port
Note: For new port to become effective, you must restart the servers.
The Uniform Server Zero sets the port environment variable MYSQL_TCP_PORT and updates the user configuration file user_configuration.bat. The environment variable MYSQL_TCP_PORT is used by MySQL standard utilities.
Change MySQL root password
Starting UniController provides the first opportunity to change the current root password. It is highly recommended that you set this password at the first opportunity.
Alternatively, you can skip setting a new MySQL root password and run this menu option later using:
MySQL > Change MySQL root password
Note 1: Clicking the Cancel button, no action is taken. You can set the password later.
Restore default password (root)
Restoring the MySQL root password is fully automated; just click the following sub-menu:
MySQL > Restore default password (root)
You can run Restore default password with or without the MySQL server running. In either situation, the MySQL server is started or re-started with no grant tables and the password restored. After restoration, the MySQL server is stopped.
Note: For detailed information, see MySQL - Restore password
Create / Delete Database
There are three methods for creating or deleting a database: via command prompt, phpMyAdmin or UniController.
Create Restricted MySQL User
A restricted user has no root privileges and is constrained to a single database.
There are three methods for creating a restricted user: at a command prompt, with phpMyAdmin or through UniController.
Edit Restricted MySQL User
The same aspects for creating a restricted user (above) apply to editing restricted users.
The Uniform Server's database backup allows for manual backup of a selected database.
The Uniform Server's database restore allows for manual restore of a selected database.
Edit Config file my.ini
The following sub-menu opens the MySQL configuration file in Notepad, allowing you to directly edit the file:
MySQL > Edit Config file my.ini
Location of the configuration file: UniServerZ\core\mysql\my.ini
MySQL error log
This menu option provides a convenient shortcut, allowing you to view the MySQL server log file. If you are experiencing problems with the server, this should be your first port of call; its content may shed light on a particular issue.
MySQL > MySQL error log
The path to the log file is: UniServerZ\core\mysql\data\mysql.err
A short extract from the file:
(...) [System] [MY-010116] [Server] C:\UniServerZ\core\mysql\bin\mysqld_z.exe (mysqld x.x.x) starting as process 6388 (...) [System] [MY-013576] [InnoDB] InnoDB initialization has started. (...) [System] [MY-013577] [InnoDB] InnoDB initialization has ended. (...) [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. (...) [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel. (...) [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060 (...) [System] [MY-010931] [Server] C:\(...)\mysqld_z.exe: ready for connections. Version: 'x.x.x' socket: '' port: 3306 MySQL (...)
MySQL configuration notes
UniController MySQL command-line parameter override
Internally, UniController uses a command-line to start the MySQL server with the following format:
..\UniServerZ\(...)\mysqld_z.exe --defaults-file=" " --tmpdir=" " --datadir=" " --innodb_data_home_dir=" " --innodb_log_group_home_dir=" "
Parameters with example values
Parameter --defaults-file forces the MySQL server to use a specific configuration file; for example, new_my.ini.
--defaults-file="..\UniServerZ\core\mysql\new_my.ini " Full path to MySQL configuration file --tmpdir="..\UniServerZ\tmp " Full path to temp folder --datadir="..\UniServerZ\core\mysql\data " Full path to data folder --innodb_data_home_dir="..\UniServerZ\core\mysql\data " Full path to innodb data home folder --innodb_log_group_home_dir="..\UniServerZ\core\mysql\data " Full path to innodb log group folder
The above paths are dynamic. For portability, these paths are automatically adjusted relative to folder UniServerZ. Generally, users do not need to change the above parameters. Hence, to prevent inadvertent changes and to make portability transparent, the last four parameters were moved from the configuration file (my.ini) to the command-line.
Command-line parameters take priority over those in the configuration file. If you are using a fixed installation and need to change any of the above parameter paths, Uniform Zero XV provides a mechanism through the server configuration file UniServerZ\home\us_config\us_config.ini explained below.
Configuration section [MYSQL]
The configuration file UniServerZ\home\us_config\us_config.ini contains commonly changed parameters.