SUMMARY If sysbench is started with the “–mysql-ssl=on” option, it looks in the current directory for the following files:
1
2
3
client-cert.pem
client-key.pem
cacert.pem(note no dash)
PROCEDURE Locate the current MySQL database certificates, usually in /var/lib/mysql, and make sure that the OS user running sysbench is able to read the following 3 files:
ALTER USER'root'@'localhost'IDENTIFIED BY'newRootPassword';
https://dev.mysql.com/doc/refman/8.0/en/default-privileges.html Check and veify your my.cnf ssl entries if you see the following error in the /var/log/mysqld.log file at startup:
1
Failed toset up SSL because of the following SSL library error:SSL_CTX_set_default_verify_paths failed
mysql>update mysql.user set Password=PASSWORD('secret')where user='root';
mysql>flush privileges;
mysql>^D
service mysql stop
service mysql start
~OR~
service mysqld stop
service mysqld start
For MySQL 5.7: https://dev.mysql.com/doc/refman/5.7/en/resetting-permissions.html For some other v5.7 nodes, I had admin access via a different user’s login, so all I needed was this:
1
2
ALTER USER'root'@'localhost'IDENTIFIED BY'secret';
-N: No column headers -B: Batch mode – use tabs as field separators https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-output-formats.html Multiple Formats Available: Table Format – use –result-format=table, alias –table Tab Separated Format – use –result-format=tabbed, alias –tabbed Vertical Format – use –result-format=vertical, alias –vertical JSON Format Output – use –result-format=VALUE, alias –json[=pretty|raw|off] VALUE may be one of: json or […]
echo`mysql-uyourUser-pyourPassword-B--disable-column-names-e"SELECT CONCAT('DROP DATABASE ', SCHEMA_NAME, ';') FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME LIKE 'yourPrefix%';"`|mysql-uyourUser-pyourPassword-B