Percona Server with XtraDB

mysql_install_db does not function properly in PS 5.6.10-alpha60.2-341 (debug/valgrind-debug)

Reported by Roel Van de Paar on 2013-05-13
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Server
Unknown
Unknown
Percona Server
Status tracked in 5.6
5.1
Undecided
Unassigned
5.5
Undecided
Unassigned
5.6
Critical
Ignacio Nin

Bug Description

[roel@hppro1 Percona-Server-5.6.10-alpha60.2-341-debug.Linux.x86_64]$ /data/opt/roel/Percona-Server-5.6.10-alpha60.2-341-debug.Linux.x86_64/scripts/mysql_install_db --no-defaults --basedir=/data/opt/roel/Percona-Server-5.6.10-alpha60.2-341-debug.Linux.x86_64 --datadir=/data/opt/roel/Percona-Server-5.6.10-alpha60.2-341-debug.Linux.x86_64/data
FATAL ERROR: Could not find

If you compiled from source, you need to run 'make install' to
copy the software into the correct location ready for operation.

If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.

As discussed on IRC, will re-visit on the new 5.6 branch.

Changed in percona-server:
status: Confirmed → Incomplete
Alexey Kopytov (akopytov) wrote :

Works fine for me even in the current trunk:

$ rm -rf /data/ps56
$ cd ~/src/launchpad/percona-server/5.6/Percona-Server
$ make install DESTDIR=/data/ps56
$ /data/ps56/usr/local/mysql/scripts/mysql_install_db --no-defaults --basedir=/data/ps56/usr/local/mysql --datadir=/data/ps56/usr/local/mysql/data
...
$ ls /data/ps56/usr/local/mysql/data/
ib_logfile0 ib_logfile1 ibdata1 mysql performance_schema test

Roel Van de Paar (roel11) wrote :

Issue remains as before, not sure why it works for Alexey

[roel@qaserver Percona-Server-5.6.11-alpha60.3-372-debug.Linux.x86_64]$ ./scripts/mysql_install_db --no-defaults --basedir=/ssd/Percona-Server-5.6.11-alpha60.3-372-debug.Linux.x86_64 --datadir=/ssd/Percona-Server-5.6.11-alpha60.3-372-debug.Linux.x86_64/data
FATAL ERROR: Could not find

If you compiled from source, you need to run 'make install' to
copy the software into the correct location ready for operation.

If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.

tags: added: qablock
Roel Van de Paar (roel11) wrote :

I note that Alexey uses "make install". And the same is listed here: https://kb.askmonty.org/en/fatal-error-could-not-find-mysqld-when-run-the-script-scriptsmysql_install_/

However, these are extracted builds (using ./build/build-binary.sh), so there is no possibility to run make install in the directory from the extracted tarball (and using the source to do so seems like a hack).

[roel@qaserver Percona-Server-5.6.11-alpha60.3-372-debug.Linux.x86_64]$ make install DESTDIR=/ssd/Percona-Server-5.6.11-alpha60.3-372-debug.Linux.x86_64/data
make: *** No rule to make target `install'. Stop. <=== as expected, and doing so from the source seems like a hack

This was also never needed in 5.5, which worked fine.

Roel Van de Paar (roel11) wrote :

Also note that here it does not list any specific binary name it cannot locate

Roel Van de Paar (roel11) wrote :

The problem is: mysqld-debug vs mysqld, and it happens only on debug + valgrind/debug binaries:

===================
[roel@qaserver Percona-Server-5.6.11-alpha60.3-372-debug.Linux.x86_64]$ ./scripts/mysql_install_db --no-defaults --basedir=/ssd/Percona-Server-5.6.11-alpha60.3-372-debug.Linux.x86_64 --datadir=/ssd/Percona-Server-5.6.11-alpha60.3-372-debug.Linux.x86_64/data
FATAL ERROR: Could not find

If you compiled from source, you need to run 'make install' to
copy the software into the correct location ready for operation.

If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.

[roel@qaserver Percona-Server-5.6.11-alpha60.3-372-debug.Linux.x86_64]$ mv bin/mysqld-debug bin/mysqld <-------- !!!
[roel@qaserver Percona-Server-5.6.11-alpha60.3-372-debug.Linux.x86_64]$ ./scripts/mysql_install_db --no-defaults --basedir=/ssd/Percona-Server-5.6.11-alpha60.3-372-debug.Linux.x86_64 --datadir=/ssd/Percona-Server-5.6.11-alpha60.3-372-debug.Linux.x86_64/data
Installing MySQL system tables...2013-06-17 08:59:59 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
[.... works ....]
===================

And it's clear from the source it doesn't check for mysqld-debug:

===================
-x $mysqld or -f "$mysqld.exe" or cannot_find_file($mysqld);
# Try to determine the hostname
my $hostname = hostname();
===================

Unless there is a good/specific reason, I would like to ask we not use mysql-debug in any case, it unnecessarily complicates testing in various ways.

summary: mysql_install_db does not function properly in PS 5.6.10-alpha60.2-341
+ (debug/valgrind-debug)
Roel Van de Paar (roel11) wrote :

The actual error in the script is slightly higher:

$mysqld = './bin/mysqld';

Also, not sure why it would not pass the variable correctly to the function so that the output would be clearer:

-x $mysqld or -f "$mysqld.exe" or cannot_find_file($mysqld);

This needs to be fixed also so that "FATAL ERROR: Could not find" actually contained what it cannot find in the future.

Roel Van de Paar (roel11) wrote :

5.5 and 5.1 both have "mysqld" instead of "mysqld-debug" for debug builds.

This is probably an upstream bug. IIRC mysqld-debug is produced by cmake options -DBUILD_CONFIG=mysql_release -DWITH_DEBUG=ON, and this combination must fail with Oracle MySQL mysql_install_db too.

Roel, can you check this and report it there?

Roel Van de Paar (roel11) wrote :

Ignacio, as I am leaving on holiday, can you please followup on verifying this? It's a packaging script issue.

Roel Van de Paar (roel11) wrote :

Confirmed by verifying that binary is now named mysqld and no longer mysqld-debug. Great work Ignacio

Roel Van de Paar (roel11) wrote :

This bug is upstream also, so logged MS bug
http://bugs.mysql.com/bug.php?id=69856

tags: added: upstream

Opened bug 1206196 to add 69856 to the list of our fixed bugs.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.