/batm/config/database
db_name=batm db_username=batm db_password=batm db_host=127.0.0.1 db_port=3306 |
Available from 20210808 release.
Note: the two entries below are different for Master and Admin (CAS GUI)
db_connection_params_master=useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8&autoReconnect=true&useSSL=false db_connection_params_admin=useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8&autoReconnect=true&serverTimezone=UTC&useCursorFetch=true&enabledTLSProtocols=TLSv1,TLSv1.1,TLSv1.2,TLSv1.3 |
You can specify these entries when you need to provide different or additional query (connection URL) parameters (e.g. SSL settings).
Don’t change the value in standalone.xml
’s <connection-url>
tag, use this config file instead.
When in a need to customize mysql
command line options (e.g. in batm-manage backup/restore command) please refer to https://dev.mysql.com/doc/refman/5.7/en/option-files.html to use Global options to define your custom parameters.
Available options: https://dev.mysql.com/doc/refman/5.7/en/connection-options.html
The MySQL root password is required for database restores. Ubuntu (by default) doesn’t set a password for the MySQL “root” user during installation. The schema used by MySQL is not as insecure as you might think, but it could still be hardened nonetheless. A missing root password may cause issues during restores, depending upon the version you use.
The MySQL “root” user and your Ubuntu “root” user passwords are not the same thing.
The MySQL “root” user and your Ubuntu “root” user passwords are not the same thing.
Creating a root password is recommended for improved security.
mysql -u root -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'rootpass'; FLUSH PRIVILEGES;" |
replace rootpass
with any memorable root password.
mysql -u root -p -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'rootpass'; FLUSH PRIVILEGES;" |
replace rootpass
with any memorable root password, then
enter the old password when requested.
If you’ve lost or forgotten your old root password, please refer to this excellent article from Digital Ocean:
remember, you are using MySQL (not MariaDB). Follow the correct instructions.
To test if you have a MySQL password set, use:
mysql -u root -e "select user, host, plugin from mysql.user where user = 'root';" |
This is an example of an unset (or improperly set) password:
the insecure authorization plugin is using “auth_socket” (which is native to newer Ubuntu versions and the default on DO droplets).
mysql -u root -p |
Enter the (now required) password, and then type (at the mysql prompt):
select user, host, plugin from mysql.user where user = 'root'; |
Perfect.