MySQL
Service overview
| Software owner | Percona LLC |
|---|---|
| Management | wfmanager (start | stop | restart | status) mysql |
| Log files | Access logs: <INSTALL_DIR>/supervisord/log/mysql.out.logError logs: <INSTALL_DIR>/supervisord/log/mysql.err.log
log-error: |
| Startup scripts | <INSTALL_DIR>/supervisord/apps/mysql.ini/mysql/usr/bin/mysql/mysql/usr/sbin/mysqld |
| Configuration files | mysql main config file: <INSTALL_DIR>/mysql/usr/my.cnf |
| Default ports | tcp 3306 |
Default parameters
| Configuration file | Default Value | Name | Description |
|---|---|---|---|
config.yml | install_dir | /opt/workfusion | Directory to put user files, logs and configs |
config.yml | mysql_port | 3306 | Default service port for MySQL DB |
secrets.yml | mysql_admin_user | mysql | Admin username for MySQL DB on the DB server |
secrets.yml | mysql_admin_pass | BhYx!@o5%m | Admin password for MySQL DB on the DB server |
secrets.yml | mysql_repl_user | repl | Username for the MySQL DB replications on the DB server |
secrets.yml | mysql_repl_pass | repl | Password for MySQL DB replications on the DB server |
Troubleshooting
Check if TCP port 3306 is available (the port may be custom).
netstat command output
$ netstat -lntp | grep 3306 tcp6 0 0 :::3306 :::* LISTEN 17628/mysqldss command output
$ ss -ltn | grep 3306 LISTEN 0 110 :::3306 :::*lsof command output
$ lsof -P -n -i :3306 | grep LISTEN mysqld 17628 wfuser 18u IPv6 175662 0t0 TCP *:3306 (LISTEN)Alternatively, check if the MySQL TCP port is available with the following command:
netstat -lntp | grep mysqlCheck the default main log files:
- Access logs:
<INSTALL_DIR>/supervisord/log/mysql.out.log - Error logs:
<INSTALL_DIR>/supervisord/log/mysql.err.log
$ tail -f <INSTALL_DIR>/supervisord/log/mysql.err.log <INSTALL_DIR>/supervisord/log/mysql.out.log- Access logs:
Use the Wfmanager util to check the mysql out (access) log:
wfmanager tail mysqlCount the number of running MySQL processes, it should not be less than 1:
pgrep mysqld | wc -lCheck MySQL version. There are several ways to do so. One of them connect to MySQL firstly and run:
run_mysql_command "SELECT @@version;"Alternatively, run from the user that has installed WorkFusion:
mysql -V or mysqld -VDisplay and check the current MySQL status:
<INSTALL_DIR>/mysql/usr/bin/mysql --port=$MYSQL_PORT -h 127.0.0.1 -u root -p$MYSQL_ROOT_PASS -e "status;"Alternatively, run from the user that has installed WorkFusion:
mysql -u root -p$MYSQL_ROOT_PASS -e "status;"Display and check the MySQL current session parameters:
<INSTALL_DIR>/mysql/usr/bin/mysql --port=$MYSQL_PORT -h 127.0.0.1 -u root -p$MYSQL_ROOT_PASS -e "show session status;"Alternatively, run from the user that has installed WorkFusion:
mysql -u root -p$MYSQL_ROOT_PASS -e "show session status;"