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

Bug #1179359 reported by Roel Van de Paar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Server
Unknown
Unknown
Percona Server moved to https://jira.percona.com/projects/PS
Fix Released
Critical
Ignacio Nin
5.1
Invalid
Undecided
Unassigned
5.5
Invalid
Undecided
Unassigned
5.6
Fix Released
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.

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

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

Changed in percona-server:
status: Confirmed → Incomplete
Revision history for this message
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

Revision history for this message
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
Revision history for this message
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.

Revision history for this message
Roel Van de Paar (roel11) wrote :

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

Revision history for this message
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)
Revision history for this message
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.

Revision history for this message
Roel Van de Paar (roel11) wrote :

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

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

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?

Revision history for this message
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.

Revision history for this message
Roel Van de Paar (roel11) wrote :

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

Revision history for this message
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
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

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

Revision history for this message
MrBrown (mrbrown09) wrote :

Hi - Can anyone help me by providing the simplest step by step form of user manual link or documentation to install MySQL Server 5.7 using Binaries in Ubuntu.

I have tried many times using the Reference manual but I couldn't succeed. So please help me towards the simplest direction. e-mail the link or documentation to <email address hidden>. Thank You in advance.

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-359

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

Other bug subscribers

Remote bug watches

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