for mysqldir in $DB_CLUSTERS; do
mysqlstatus "$mysqldir"
if [ "$MYSQL_STATUS" = "running" ]; then
- touch /var/lock/subsys/mysql
+ touch /var/lock/subsys/mysql-@mysqlversion@
return
fi
done
- rm -f /var/lock/subsys/mysql
+ rm -f /var/lock/subsys/mysql-@mysqlversion@
}
mysqlinit() {
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL USERS!
Start database:
-$ service mysql start
+$ service mysql-@mysqlversion@ start
and set passwords:
ALTER USER 'root'@'localhost' IDENTIFIED BY 'newpassword';
FLUSH PRIVILEGES;
-For 'mysql_sysadmin' (RELOAD and SHUTDOWN privileges):
+For 'mysql_sysadmin' (RELOAD, SHUTDOWN and REPLICATION CLIENT privileges):
CREATE USER 'mysql_sysadmin'@'localhost' IDENTIFIED BY 'sysnewpassword' PASSWORD EXPIRE NEVER;
-GRANT RELOAD, SHUTDOWN ON *.* TO 'mysql_sysadmin'@'localhost';
+GRANT RELOAD, SHUTDOWN, REPLICATION CLIENT ON *.* TO 'mysql_sysadmin'@'localhost';
FLUSH PRIVILEGES;
Both into command:
$ mysql -u root -p --ssl-mode=disabled -S $MYSQL_SOCKET
-NOTE 1:
-CURRENT TEMPORARY ROOT PASSWORD CAN BE FOUND IN LOG
-(grep for "A temporary password is generated" string):
-$MYSQL_ERRLOG
-
-
-NOTE 2:
+NOTE:
mysql_sysadmin password should be placed to $MYSQL_CONFIG in
mysqladmin section. See the manual for more instructions.
(This user is used at logs rotation and server shutdown)
mysql> show tables
Try 'mysqld --help' if you have problems with paths. Setting on
-logging in $MYSQL_DATA_DIR/mysqld.conf gives you a log in /var/log/mysql/mysql-8.0-query.log that
-may be helpful. The latest information about MySQL is available on the
-web at http://www.mysql.com/.
+logging in $MYSQL_DATA_DIR/mysqld.conf gives you a log in
+/var/log/mysql/@mysqlversion/query.log that may be helpful.
+The latest information about MySQL is available on the web at
+http://www.mysql.com/.
Please check TLD Linux site for newer versions of this package.
}
condrestart() {
- if [ ! -f /var/lock/subsys/mysql ]; then
+ if [ ! -f /var/lock/subsys/mysql-@mysqlversion@ ]; then
msg_not_running "MySQL"
RETVAL=$1
return