mirror of
https://github.com/MariaDB/server.git
synced 2025-08-06 18:41:37 +02:00

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.
48 lines
1.1 KiB
Bash
48 lines
1.1 KiB
Bash
#!/bin/sh
|
|
|
|
SCRIPT_NAME="`basename $0`"
|
|
|
|
usage()
|
|
{
|
|
echo "Usage: ${SCRIPT_NAME} [--help|-h]"
|
|
echo ""
|
|
echo "This script creates the MySQL system tables and starts the server."
|
|
}
|
|
|
|
for arg do
|
|
case "$arg" in
|
|
--help|-h)
|
|
usage
|
|
exit 0
|
|
;;
|
|
*)
|
|
echo "${SCRIPT_NAME}: unknown option $arg"
|
|
usage
|
|
exit 2
|
|
;;
|
|
esac
|
|
done
|
|
|
|
if test ! -x ./scripts/mariadb-install-db
|
|
then
|
|
echo "I didn't find the script './scripts/mariadb-install-db'."
|
|
echo "Please execute this script in the mysql distribution directory!"
|
|
exit 1;
|
|
fi
|
|
|
|
echo "NOTE: This is a MySQL binary distribution. It's ready to run, you don't"
|
|
echo "need to configure it!"
|
|
echo ""
|
|
echo "To help you a bit, I am now going to create the needed MySQL databases"
|
|
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/mariadb-install-db --no-defaults
|
|
if [ $? = 0 ]
|
|
then
|
|
echo "Starting the mariadbd server. You can test that it is up and running"
|
|
echo "with the command:"
|
|
echo "./bin/mysqladmin version"
|
|
./bin/mysqld_safe --no-defaults &
|
|
fi
|