summaryrefslogtreecommitdiff
path: root/scripts/mysql_install_db.sh
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '10.1' into 10.2Oleksandr Byelkin2020-08-021-2/+1
|\
| * mysql_install_db: help lists --defaults-file twiceDaniel Black2020-07-241-2/+1
| | | | | | | | | | | | | | Removed duplicate. Also move the --no-defaults option close to the other "default*" options.
* | Merge branch '10.1' into 10.2Oleksandr Byelkin2019-12-031-1/+1
|\ \ | |/
| * Merge branch '5.5' into 10.1Oleksandr Byelkin2019-12-031-1/+1
| |\
| | * Using `variables` instead of `values` in mysqld --help documentation would ↵Anel Husakovic2019-12-021-1/+1
| | | | | | | | | | | | be more accurate
* | | Merge branch '10.1' into 10.2Oleksandr Byelkin2019-07-261-1/+8
|\ \ \ | |/ /
| * | Merge branch '5.5' into 10.1Oleksandr Byelkin2019-07-251-1/+8
| |\ \ | | |/
| | * Extra comment to mysql_install_dbVicențiu Ciorbaru2019-07-011-0/+2
| | | | | | | | | | | | | | | Explain why it makes sense to not consider builddir == srcdir directly, for cases when we do out-of-source builds.
| | * mysql_install_db: assume builddir is dirname0Daniel Black2019-07-011-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The assumption in the original commit for --builddir (648d3cedbc09), was to assume that without a --builddir, and when --srcdir is specified, that the builddir is the same as the srcdir. The problem is that this assumption does not hold for out-of-source builds and we can figure out the builddir by looking for where mysql_install_db script is. As mysql_install_db is in the builddir, we use dirname0 as the builddir after checking that my_print_defaults is also located from dirname0, otherwise default to old behavior.
* | | Merge 10.1 into 10.2Marko Mäkelä2019-05-131-1/+1
|\ \ \ | |/ /
| * | Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-111-1/+1
| |\ \ | | |/
| | * Update FSF AddressVicențiu Ciorbaru2019-05-111-1/+1
| | | | | | | | | | | | * Update wrong zip-code
* | | Merge branch '10.1' into 10.2Oleksandr Byelkin2019-05-041-3/+5
|\ \ \ | |/ /
| * | MDEV-17640 UMASK_DIR configuration for mysql_install_db is not applied to ↵Sergei Golubchik2019-04-241-3/+5
| | | | | | | | | | | | | | | | | | mysql database create mysql and test databases with SQL, not mkdir.
* | | Merge branch '10.1' into 10.2Oleksandr Byelkin2019-02-191-3/+5
|\ \ \ | |/ /
| * | 1. centos has symlinks /bin->usr/bin and /sbin -> usr/sbin,Oleksandr Byelkin2019-02-191-3/+5
| | | | | | | | | | | | | | | | | | | | | but even if this script called as /bin/mysql_install_db it is still standard install and scripts are in /usr/share/ (but not in the /share/) 2. fix of bindir path
* | | Merge 10.1 into 10.2Marko Mäkelä2019-02-031-5/+16
|\ \ \ | |/ / | | | | | | | | | | | | Temporarily disable a test for commit 2175bfce3e9da8332f10ab0e0286dc93915533a2 because fixing it in 10.2 requires updating libmariadb.
| * | Merge 10.1 into 10.1Marko Mäkelä2019-02-021-5/+15
| |\ \ | | | | | | | | | | | | This is joint work with Oleksandr Byelkin.
| | * \ Merge branch '5.5' into 10.0Oleksandr Byelkin2019-01-281-5/+14
| | |\ \ | | | |/
| | | * MDEV-14580: mysql_install_db elements based on dirname of mysql_install_dbSergei Golubchik2019-01-211-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid introducing new dependencies or new syntax. That is, don't use $(...) and don't assume dirname is present. And remove unsighty /foo/bar/../xyz from the path. Use dirname instead of ../
| | | * MDEV-14580: mysql_install_db elements based on dirname of mysql_install_dbDaniel Black2019-01-211-0/+11
| | | | | | | | | | | | | | | | Closes #1086
| | | * remove duplicated paragraph from mysql_install_db.shAlexander Kuleshov2019-01-161-3/+0
| | | | | | | | | | | | | | | | Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
* | | | Merge branch '10.1' into 10.2Oleksandr Byelkin2018-09-141-1/+1
|\ \ \ \ | |/ / /
| * | | Merge branch '11.0' into 10.1Oleksandr Byelkin2018-09-061-1/+1
| |\ \ \ | | |/ /
| | * | Fix typo in `--srcdir` option in echo message status of mysql_install_dbAnel Husakovic2018-08-251-1/+1
| | | |
* | | | Merge 10.1 into 10.2Marko Mäkelä2018-08-021-1/+6
|\ \ \ \ | |/ / /
| * | | Merge branch '10.0' into bb-10.1-merge-sanjaOleksandr Byelkin2018-07-251-1/+1
| |\ \ \ | | |/ /
| | * | Merge branch '5.5' into bb-10.0-merge-sanjaOleksandr Byelkin2018-07-231-1/+1
| | |\ \ | | | |/
| | | * MDEV-15050 scripts: mysql_install_db.{sh|pl}, mysqld_multi - mysqld is in ↵Daniel Black2018-07-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | @sbindir@ Closes #551
| * | | Merge branch '10.0' into bb-10.1-mergebb-10.1-merge-sanjaOleksandr Byelkin2018-07-191-0/+5
| |\ \ \ | | |/ /
| | * | Merge branch '5.5' into bb-10.0-mergeOleksandr Byelkin2018-07-171-0/+5
| | |\ \ | | | |/
| | | * Added more help text in case mysql_install_db fails.Michael Widenius2018-06-271-0/+5
| | | |
* | | | mysql_install_db: clarify the after-install messageSergei Golubchik2018-06-211-13/+18
| | | | | | | | | | | | | | | | don't tell users to set the root password if they're using unix_socket
* | | | MDEV-14578: mysql_install_db install unix_socket plugin when ↵Sergei Golubchik2018-06-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | --auth-root-authentication-method=socket post-merge fixes
* | | | MDEV-14578: mysql_install_db install unix_socket plugin when ↵Daniel Black2018-06-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --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
* | | | Merge branch 'github/10.1' into 10.2Sergei Golubchik2018-02-061-5/+11
|\ \ \ \ | |/ / /
| * | | Merge branch 'github/10.0' into 10.1Sergei Golubchik2018-02-021-5/+11
| |\ \ \ | | |/ /
| | * | Merge remote-tracking branch '5.5' into 10.0Vicențiu Ciorbaru2018-01-241-6/+12
| | |\ \ | | | |/
| | | * mysql_install_db: correct hosting/source/maillist informationDaniel Black2018-01-231-2/+2
| | | |
| | | * mysql_install_db: correct --skip-grant-tables helpDaniel Black2018-01-231-1/+1
| | | |
| | | * Fixed mysql_install_db --no-defaultsSergey Vojtovich2018-01-131-6/+9
| | | | | | | | | | | | | | | | Regression after 5ea2801.
| | | * mysql_install_db: Use --defaults-group-suffix if specifiedDaniel Black2018-01-121-2/+5
| | | | | | | | | | | | | | | | Signed-off-by: Daniel Black <daniel@linux.vnet.ibm.com>
* | | | Merge branch '10.1' into 10.2Sergei Golubchik2017-10-241-23/+25
|\ \ \ \ | |/ / /
| * | | Merge branch '10.0' into 10.1Sergei Golubchik2017-10-221-23/+25
| |\ \ \ | | |/ /
| | * | Merge branch '5.5' into 10.0Sergei Golubchik2017-10-181-23/+25
| | |\ \ | | | |/
| | | * cleanup mysql_install_dbSergei Golubchik2017-10-171-23/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. detect resolveip location, don' assume it's in $basedir/bin 2. don't guess $scriptdir to (incorrectly) construct the $0 path 3. rename find_in_basedir -> find_in_dirs, don't prepend $basedir automatically. This allows to use identical path lists in find_in_dirs and in cannot_find_file. 4. move search path lists to CMakeLists.txt to avoid specifying the same path list twice (in find_in_dirs and in cannot_find_file).
* | | | Merge branch '10.1' into 10.2Sergei Golubchik2017-02-101-1/+39
|\ \ \ \ | |/ / /
| * | | mysql_install_db enhancements to facilitate Debian bug#848616 fixKristian Nielsen2017-01-171-1/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Debian, the default install is made more secure by omitting the anonymous user and by making the root account authenticate by unix socket authentication instead of the default password-less root. However, Debian hard-codes this change in mysql_install_db, which breaks that program for other users. This commit instead implements new general options for mysql_install_db that can be used by anyone to similarly perform a more secure install: --skip-auth-anonymous-user: omits the anonymous user. --auth-root-authentication-method=normal: Keeps the existing behaviour with a password-less root account. Currently on by default. --auth-root-socket-user=USER --auth-root-authentication-method=socket: creates the MariaDB root user with the name USER (defaults to 'root') and using unix socket authentication. This way, only that user has MariaDB root access after install. The idea with --auth-root-authentication-method=normal is that applications that need this behaviour can give that option explicitly. Then eventually we could make --auth-root-authentication-method=socket the default, giving a more secure default installation. Note that it is perfectly possible to do a secure install with --auth-root-authentication-method=normal. For example, installing a private server just for local access by a single OS-level user, by using --skip-networking and putting the connection socket in a location without public access. So it is important to preserve this API for backwards compatibility.
* | | | Merge branch '10.1' into 10.2Sergei Golubchik2016-12-291-14/+14
|\ \ \ \ | |/ / /
| * | | Merge branch '10.0' into 10.1Sergei Golubchik2016-12-111-4/+2
| |\ \ \ | | |/ /