MySQL Administration Suite
1 min readJul 9, 2022
MySQL includes client programs to administer its server software.
mysql80-client package provides these tools to administer mysql80-server on FreeBSD operating system, and namely the mysqld(8) daemon located at /usr/local/libexec
directory by default.
- mysql: Execute SQL commands on databases
- mysqladmin:
CREATE
new orDROP
existing databases hosted on the server - mysqlshow: Show databases, tables, and columns (wildcard)
- mysqldump: Export table structure and data as SQL
- mysql_config_editor: Set “login pathes” (host, port, user, and password)
- my_print_defaults: Show default options for client programs (as defined in option groups)
- perror: Convert MySQL error codes to error messages
There are also included server programs to administer the MySQL daemon:
mysqld:
the server, located in/usr/local/libexec/mysqld
Source:mysqld.cc
mysqld_safe:
server starter with auto-restart and logging (safety features)
Source:mysqld_safe.sh
mysql.server:
start/stopmysqld_safe
Source:mysql.server.sh
mysqld_multi: manage multiple servers
Source:mysqld_multi.pl.in
mysql_upgrade:
run after upgrading the server, part of the server package
Callsmysql_check
in the background
Source:program.cc
Deprecated since MySQL 8
Configuration Files
MySQL configuration files are used to keep default options for client and server programs.
my.cnf
: system’s MySQL defaults
located within/usr/local/etc/mysql
(on FreeBSD).my.cnf
: user’s MySQL defaults
located within~
(user’s home directory).mysql_history: mysql
statements history
located within~
(user’s home directory).mylogin.cnf
(binary):
login paths as created bymysql_config_editor
located within~
(user’s home directory)hostname.err
: MySQL log file
located within the database directory