mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-14578: mysql_install_db install unix_socket plugin when --auth-root-authentication-method=socket
$ cmake -DPLUGIN_AUTH_SOCKET=STATIC ../mariadb-server-10.2/ $ scripts/mysql_install_db --datadir=/tmp/mysqldatadir-auth-static --auth-root-socket-user=dan --auth-root-authentication-method=socket --builddir=. --srcdir=../mariadb-server-10.2 Installing MariaDB/MySQL system tables in '/tmp/mysqldatadir-auth-static' ... OK $ client/mysql -S /tmp/mysql.sock -e 'show create user dan@localhost' +----------------------------------------------------------+ | CREATE USER for dan@localhost | +----------------------------------------------------------+ | CREATE USER 'dan'@'localhost' IDENTIFIED VIA unix_socket | +----------------------------------------------------------+ $ cmake -DPLUGIN_AUTH_SOCKET=NO ../mariadb-server-10.2/ $ scripts/mysql_install_db --datadir=/tmp/mysqldatadir-auth-none --auth-root-socket-user=dan --auth-root-authentication-method=socket --builddir=. --srcdir=../mariadb-server-10.2 Installing MariaDB/MySQL system tables in '/tmp/mysqldatadir-auth-none' ... ERROR: 1126 Can't open shared library '.../plugin/auth_socket/auth_socket.so' (errno: 2, cannot open shared object file: No such file or directory) 2018-05-01 11:38:56 0 [ERROR] Aborting $ cmake -DPLUGIN_AUTH_SOCKET=DYNAMIC ../mariadb-server-10.2/ $ scripts/mysql_install_db --datadir=/tmp/mysqldatadir-auth-dyn --auth-root-socket-user=dan --auth-root-authentication-method=socket --builddir=. --srcdir=../mariadb-server-10.2 Installing MariaDB/MySQL system tables in '/tmp/mysqldatadir-auth-dyn' ... OK $ ./sql/mysqld --datadir=/tmp/mysqldatadir-auth-dyn --lc-messages-dir=${PWD}/sql/share --plugin-dir=./plugin/auth_socket/ $ client/mysql -S /tmp/mysql.sock -e 'show create user dan@localhost' +----------------------------------------------------------+ | CREATE USER for dan@localhost | +----------------------------------------------------------+ | CREATE USER 'dan'@'localhost' IDENTIFIED VIA unix_socket | +----------------------------------------------------------+ $ sudo make install $ sudo chmod a+rwx /usr/local/mysql/data $ cd /usr/local/mysql/ $ scripts/mysql_install_db --auth-root-socket-user=dan --auth-root-authentication-method=socket Installing MariaDB/MySQL system tables in './data' ... OK .. $ bin/mysqld_safe $ client/mysql -S /tmp/mysql.sock -e 'show create user dan@localhost' +----------------------------------------------------------+ | CREATE USER for dan@localhost | +----------------------------------------------------------+ | CREATE USER 'dan'@'localhost' IDENTIFIED VIA unix_socket | +----------------------------------------------------------+ Merges #767
This commit is contained in:
committed by
Sergei Golubchik
parent
1033fa4bcc
commit
53db5edbcf
@ -307,6 +307,7 @@ then
|
||||
langdir="$basedir/sql/share/english"
|
||||
srcpkgdatadir="$srcdir/scripts"
|
||||
buildpkgdatadir="$builddir/scripts"
|
||||
plugindir="$builddir/plugin/auth_socket/"
|
||||
elif test -n "$basedir"
|
||||
then
|
||||
bindir="$basedir/bin" # only used in the help text
|
||||
@ -335,6 +336,7 @@ then
|
||||
cannot_find_file fill_help_tables.sql @pkgdata_locations@
|
||||
exit 1
|
||||
fi
|
||||
plugindir="$basedir/@INSTALL_PLUGINDIR@"
|
||||
else
|
||||
basedir="@prefix@"
|
||||
bindir="@bindir@"
|
||||
@ -342,6 +344,7 @@ else
|
||||
mysqld="@libexecdir@/mysqld"
|
||||
srcpkgdatadir="@pkgdatadir@"
|
||||
buildpkgdatadir="@pkgdatadir@"
|
||||
plugindir="@INSTALL_PLUGINDIR@"
|
||||
fi
|
||||
|
||||
# Set up paths to SQL scripts required for bootstrap
|
||||
@ -460,6 +463,7 @@ mysqld_install_cmd_line()
|
||||
{
|
||||
"$mysqld_bootstrap" $defaults $defaults_group_suffix "$mysqld_opt" --bootstrap $silent_startup\
|
||||
"--basedir=$basedir" "--datadir=$ldata" --log-warnings=0 --enforce-storage-engine="" \
|
||||
"--plugin-dir=${plugindir}" \
|
||||
$args --max_allowed_packet=8M \
|
||||
--net_buffer_length=16K
|
||||
}
|
||||
|
Reference in New Issue
Block a user