mirror of
https://github.com/MariaDB/server.git
synced 2026-10-23 18:49:29 +03:00
MDEV-36738: mariadb@.service incorrectly changing pam ownership in mariadb-install-db
It was mysql_install_db, and this is changed to mariadb-install-db. likewise changed all of the support-files references to mysql_install_db. This install script is part of the service as a useful instigation step, and a no-op in subseqeuent runs. This script does however change the auth_pam_tool_dir ownership. When running a multi-instance based on username, changing the auth_pam_tool_dir will only cause troubles for the other users. If you are running multiple instances on username is seems you are unlikely do be having pam access for all users. Even if you where the solution on auth_pam_tool_dir would be a group permission and group access based on the users. As such skip the changing of ownership.
This commit is contained in:
@@ -80,7 +80,7 @@ Note
|
||||
lib Libraries
|
||||
man Unix manual pages
|
||||
mysql-test MySQL test suite
|
||||
scripts Contains the mysql_install_db script
|
||||
scripts Contains the mariadb-install-db script
|
||||
share/mysql Error message files
|
||||
sql-bench Benchmarks
|
||||
support-files Scripts and sample configuration files
|
||||
@@ -288,7 +288,7 @@ Note
|
||||
/usr/libexec The mariadbd server
|
||||
/usr/share/man Unix manual pages
|
||||
/usr/share/mysql/mysql-test MySQL test suite
|
||||
/usr/share/mysql Contains the mysql_install_db script
|
||||
/usr/share/mysql Contains the mariadb-install-db script
|
||||
/var/mysql/mysql.sock The location of the MySQL Unix socket
|
||||
|
||||
Note
|
||||
|
||||
@@ -23,13 +23,13 @@
|
||||
# installation has been performed.
|
||||
#
|
||||
# This script will install the MySQL privilege tables using the
|
||||
# "mysql_install_db" script and will correct the ownerships of these files
|
||||
# "mariadb-install-db" script and will correct the ownerships of these files
|
||||
# afterwards.
|
||||
#
|
||||
|
||||
if cd @prefix@ ; then
|
||||
if [ ! -f data/mysql/db.frm ] ; then
|
||||
./scripts/mysql_install_db --rpm
|
||||
./scripts/mariadb-install-db --rpm
|
||||
fi
|
||||
|
||||
if [ -d data ] ; then
|
||||
|
||||
@@ -23,9 +23,9 @@ for arg do
|
||||
esac
|
||||
done
|
||||
|
||||
if test ! -x ./scripts/mysql_install_db
|
||||
if test ! -x ./scripts/mariadb-install-db
|
||||
then
|
||||
echo "I didn't find the script './scripts/mysql_install_db'."
|
||||
echo "I didn't find the script './scripts/mariadb-install-db'."
|
||||
echo "Please execute this script in the mysql distribution directory!"
|
||||
exit 1;
|
||||
fi
|
||||
@@ -38,7 +38,7 @@ echo "and start the MySQL server for you. If you run into any trouble, please"
|
||||
echo "consult the MySQL manual, that you can find in the Docs directory."
|
||||
echo ""
|
||||
|
||||
./scripts/mysql_install_db --no-defaults
|
||||
./scripts/mariadb-install-db --no-defaults
|
||||
if [ $? = 0 ]
|
||||
then
|
||||
echo "Starting the mariadbd server. You can test that it is up and running"
|
||||
|
||||
@@ -82,7 +82,7 @@ ExecStartPre=/bin/sh -c "[ ! -e @bindir@/galera_recovery ] && VAR= || \
|
||||
&& systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1"
|
||||
|
||||
# Needed to create system tables etc.
|
||||
# ExecStartPre=@scriptdir@/mysql_install_db -u mysql
|
||||
# ExecStartPre=@scriptdir@/mariadb-install-db -u mysql
|
||||
|
||||
# Start main service
|
||||
# MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb.service.d/MY_SPECIAL.conf
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
# User=%I
|
||||
# ProtectHome=false
|
||||
# ExecStartPre=
|
||||
# ExecStartPre=@scriptdir@/mysql_install_db $MYSQLD_MULTI_INSTANCE \
|
||||
# ExecStartPre=@scriptdir@/mariadb-install-db $MYSQLD_MULTI_INSTANCE \
|
||||
# --auth-root-authentication-method=socket --auth-root-socket-user=%I
|
||||
# Environment=MYSQLD_MULTI_INSTANCE="--defaults-file=/home/%I/my%I.cnf \
|
||||
# --datadir=/home/%I/mysqldatadir --skip-networking --socket=@mysql-%I"
|
||||
@@ -197,8 +197,8 @@ ProtectSystem=full
|
||||
# Prevent accessing /home, /root and /run/user
|
||||
ProtectHome=true
|
||||
|
||||
# Needed to create system tables etc.
|
||||
ExecStartPre=@scriptdir@/mysql_install_db $MYSQLD_MULTI_INSTANCE
|
||||
# Needed to create system tables etc. --rpm to not do pam permission changes.
|
||||
ExecStartPre=@scriptdir@/mariadb-install-db $MYSQLD_MULTI_INSTANCE --rpm
|
||||
|
||||
# Start main service
|
||||
# A few variables are here:
|
||||
|
||||
Reference in New Issue
Block a user