Commit graph

449 commits

Author SHA1 Message Date
Sergei Golubchik
74a0cde1c6 mysql_install_db always has to pass --user=$user to the mysqld
followup for 9d18b62467

strangely enough it only failed upgrade test on eoan
2020-01-19 14:32:29 +01:00
Sergei Golubchik
51a9571256 MDEV-20205 mysql_install_db shouldn't execute chown
Make chown error non-fatal. Just print a warning.
2020-01-17 18:14:43 +01:00
Sergei Golubchik
9d18b62467 rpm/deb and auth_pam_tool_dir/auth_pam_tool
don't let mysql_install_db set SUID bit for auth_pam_tool in rpm/deb
packages - instead package files with correct permissions and
only fix the ownership of auth_pam_tool_dir (which can only be done
after mysql user is created, so in post-install).

keep old mysql_install_db behavior for bintars
2020-01-17 18:14:43 +01:00
Otto Kekäläinen
b9dea911bf Extend mysql_instal_db to search plugins also from lib/*/mariadb19/plugin
In Debian official the MariaDB plugins (.so files) go to a separate
versioned directory so that upgrades and dependencies will work correctly.

This change extends this script to check the /usr/lib/*/mariadb19/..
directory in addition to what it already does. Without this change
the script fails with:

  $ mysql_install_db ...
  Cannot change ownership of the '/auth_pam_tool_dir' directory
  to the 'mysql' user. Check that you have the necessary permissions and
  try again.
2019-09-18 16:11:49 +03:00
Oleksandr Byelkin
2792c6e7b0 Merge branch '10.3' into 10.4 2019-07-28 13:43:26 +02:00
Oleksandr Byelkin
d97342b6f2 Merge branch '10.2' into 10.3 2019-07-26 22:42:35 +02:00
Oleksandr Byelkin
cf8c2a3c3b Merge branch '10.1' into 10.2 2019-07-26 07:03:39 +02:00
Oleksandr Byelkin
ae476868a5 Merge branch '5.5' into 10.1 2019-07-25 13:27:11 +02:00
Monty
4733464975 Fixed that mariadb-# binaries reads their corresponding entry from my.cnf
- Added mariadb-# to load_default_groups to all mariadb-# scripts and
  mariadb-binaries.
- Added mariadbd and mariadbd-"version" to load_default_groups for the
  mysqld/mariadb server
- Added mariadb-client to load_default_groups for the mysql/mariadb client

Other things
- Ignored mysql-test/lib/My/SafeProcess/wsrep_check_version
- mysql_install_db will now automatically detect if run from srcdir
2019-07-18 15:32:22 +03:00
Sergei Golubchik
ec494cb1fa MDEV-19876 pam v2: auth_pam_tool_dir and auth_pam_tool permissions are wrong in RPMs
in fact, permissions were fine in RPM, but mysql_install_db
was resetting them.

Also fix Debian, while we're at it
2019-07-02 14:27:31 +02:00
Vicențiu Ciorbaru
ecd8f44844 Extra comment to mysql_install_db
Explain why it makes sense to not consider builddir == srcdir directly,
for cases when we do out-of-source builds.
2019-07-01 13:55:34 +03:00
Daniel Black
d890c45b62 mysql_install_db: assume builddir is dirname0
The assumption in the original commit for --builddir (648d3cedbc),
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.
2019-07-01 13:52:28 +03:00
Oleksandr Byelkin
c07325f932 Merge branch '10.3' into 10.4 2019-05-19 20:55:37 +02:00
Anel Husakovic
366bf10475 Fix echo message 2019-05-16 12:55:29 +03:00
Marko Mäkelä
be85d3e61b Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
Marko Mäkelä
26a14ee130 Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
Oleksandr Byelkin
c51f85f882 Merge branch '10.2' into 10.3 2019-05-12 17:20:23 +02:00
Vicențiu Ciorbaru
cb248f8806 Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
Vicențiu Ciorbaru
5543b75550 Update FSF Address
* Update wrong zip-code
2019-05-11 21:29:06 +03:00
Oleksandr Byelkin
8cbb14ef5d Merge branch '10.1' into 10.2 2019-05-04 17:04:55 +02:00
Sergei Golubchik
3db6de33b2 MDEV-17640 UMASK_DIR configuration for mysql_install_db is not applied to mysql database
create mysql and test databases with SQL, not mkdir.
2019-04-24 16:06:54 +02:00
Sergei Golubchik
33b9f80595 mysql_install_db: make sure the variable's value is visible
move the assignment out of a function, so that it wouldn't
happen in a subshell
2019-02-21 16:54:31 +01:00
Sergei Golubchik
65ffea3924 MDEV-18297 clarify mysql_install_db help text 2019-02-21 15:04:03 +01:00
Sergei Golubchik
83de75d66d try harder to link unix_socket plugin statically
fix unix_socket tests to work if unix_socket is a built-in
2019-02-21 15:04:03 +01:00
Oleksandr Byelkin
93ac7ae70f Merge branch '10.3' into 10.4 2019-02-21 14:40:52 +01:00
Oleksandr Byelkin
00906719fe Merge branch '10.2' into bb-10.3-merge 2019-02-19 17:26:44 +01:00
Oleksandr Byelkin
91d506cf2d Merge branch '10.1' into 10.2 2019-02-19 16:47:45 +01:00
Oleksandr Byelkin
431da59f1c 1. centos has symlinks /bin->usr/bin and /sbin -> usr/sbin,
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
2019-02-19 16:09:46 +01:00
Sergei Golubchik
b9f3f06857 MDEV-12484 Enable unix socket authentication by default
Change the default authentication for root@localhost to

  IDENTIFIED VIA mysql_native_password USING 'invalid' OR unix_socket

which provides secure passwordless login, while still allowing
SET PASSWORD to work as expected.

Also create a second all-privilege account for the user that owns
datadir (and thus has full access to the data anyway).

Compile unix_socket plugin statically into the server.
2019-02-12 19:14:37 +01:00
Sergei Golubchik
f07b76fcfd cleanup: remove reduntant variable 2019-02-12 19:14:37 +01:00
Oleksandr Byelkin
65c5ef9b49 dirty merge 2019-02-07 13:59:31 +01:00
Marko Mäkelä
a249e57b68 Merge 10.1 into 10.2
Temporarily disable a test for
commit 2175bfce3e
because fixing it in 10.2 requires updating libmariadb.
2019-02-03 17:22:05 +02:00
Marko Mäkelä
213ece2f2e Merge 10.1 into 10.1
This is joint work with Oleksandr Byelkin.
2019-02-02 13:00:15 +02:00
Oleksandr Byelkin
a3df9bcadc Merge branch '5.5' into 10.0 2019-01-28 10:36:12 +01:00
Sergei Golubchik
9c5be7d131 MDEV-14580: mysql_install_db elements based on dirname of mysql_install_db
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 ../
2019-01-21 17:30:07 +01:00
Daniel Black
50e593386f MDEV-14580: mysql_install_db elements based on dirname of mysql_install_db
Closes #1086
2019-01-21 17:30:07 +01:00
Alexander Kuleshov
78f62e9079 remove duplicated paragraph from mysql_install_db.sh
Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
2019-01-16 23:55:59 +04:00
Sergei Golubchik
4abb8216a0 MDEV-17658 change the structure of mysql.user table
Implement User_table_json.
Fix scripts to use mysql.global_priv.
Fix tests.
2018-12-12 00:31:44 +01:00
Oleksandr Byelkin
28f08d3753 Merge branch '10.1' into 10.2 2018-09-14 08:47:22 +02:00
Oleksandr Byelkin
31081593aa Merge branch '11.0' into 10.1 2018-09-06 22:45:19 +02:00
Anel Husakovic
4ba6327f95 Fix typo in --srcdir option in echo message status of mysql_install_db 2018-08-25 17:51:15 +03:00
Marko Mäkelä
734db318ac Merge 10.3 into 10.4 2018-08-16 10:08:30 +03:00
Monty
0e0f1092b8 Fixed some source comments and help texts 2018-08-14 11:22:05 +03:00
Marko Mäkelä
05459706f2 Merge 10.2 into 10.3 2018-08-03 15:57:23 +03:00
Marko Mäkelä
ef3070e997 Merge 10.1 into 10.2 2018-08-02 08:19:57 +03:00
Michael Widenius
0c745c743c Don't give warnings from perror or resolveip with safemalloc
- Added my_end(0) before exit
- Fixed typo in mysql_install_db
2018-07-29 10:56:11 +03:00
Oleksandr Byelkin
cb5952b506 Merge branch '10.0' into bb-10.1-merge-sanja 2018-07-25 22:24:40 +02:00
Oleksandr Byelkin
304440b014 Merge branch '5.5' into bb-10.0-merge-sanja 2018-07-23 11:55:18 +02:00
Oleksandr Byelkin
0896d7ebc3 Merge branch '10.0' into bb-10.1-merge 2018-07-19 12:55:54 +02:00
Oleksandr Byelkin
e5c26fdfab Merge branch '5.5' into bb-10.0-merge 2018-07-17 16:56:21 +02:00