From: Alain Spineux Date: Wed, 6 Dec 2023 15:30:22 +0000 (+0100) Subject: regress: add README.mysql to setup mysql env for regress X-Git-Tag: Beta-15.0.1~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a707294f68d6e66d53a406f1ea9516edc1ec7f74;p=thirdparty%2Fbacula.git regress: add README.mysql to setup mysql env for regress --- diff --git a/regress/README.mysql b/regress/README.mysql new file mode 100644 index 000000000..c036a1f2b --- /dev/null +++ b/regress/README.mysql @@ -0,0 +1,35 @@ +Here is my tricks to run regression scripts with mysql +on ubuntu 22.04 with mysql 8.0. + +Notice that in the initialisation of the regress environement for mysql +there is a mix of use of the command "mysql" (using the unix user privilege) +and "mysql -u root" (using the root privilege) both without passwords. + +First I create a mysql user that match my unix user without any password, +with enough privilege to create a database and some tables + +$ whoami +bac +$ sudo mysql +mysql> create user 'bac'@'localhost'; +Query OK, 0 rows affected (0.03 sec) +mysql> grant all privileges on *.* to 'bac'@'localhost'; +Query OK, 0 rows affected (0.02 sec) + +Second I remove the password for the mysql user 'root'. + +mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY ''; +Query OK, 0 rows affected (0.02 sec) +mysql> quit; + +notice that I change my authentication from 'auth_socket' to +'mysql_native_password' and second I set the password to the +empty string ''. + +Finally I use a different user than my unix user in bacula config file : + +# DB parameters +db_name="regress" +db_user="regress" +db_password="bacula" +