[MDEV-5688] When mysql_install_db fails it recommends using /usr/scripts/msqlbug to report a bug, but that file doesnt exist. Created: 2014-02-16  Updated: 2014-02-18  Resolved: 2014-02-18

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 5.1.67, 5.2.14, 5.3.12, 5.5.35, 10.0.8
Fix Version/s: 5.5.36, 10.0.9

Type: Bug Priority: Trivial
Reporter: Andrew McDonnell Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None
Environment:

Debian wheezy amd64 using MariaDB debian repository packages


Issue Links:
PartOf
is part of MDEV-5652 5.5.36 merge Closed

 Description   

For various reasons I am encountering errors when attempting to setup a database (Note, those problems are not the subject of this bug)

However, the error message suggests running file /usr/scripts/mysqlbug which does not exist (neither does directory /usr/scripts)

Installation was from APT repository http://mirror.aarnet.edu.au/pub/MariaDB/repo/10.0/debian version 10.0.8+maria-1~wheezy, as per the instructions at https://downloads.mariadb.org/mariadb/repositories/#mirror=aarnet_pty_ltd&distro=Debian&distro_release=wheezy&version=10.0

I eventually found the file at /usr/bin/mysqlbug provided by mariadb-client-10.0

Example:

root@atlantis4:/var/log# mysql_install_db --verbose
Installing MariaDB/MySQL system tables in '/var/lib/mysql' ...
140216 22:06:29 [Note] InnoDB: The InnoDB memory heap is disabled
140216 22:06:29 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
140216 22:06:29 [Note] InnoDB: Compressed tables use zlib 1.2.7
140216 22:06:29 [Note] InnoDB: Using Linux native AIO
140216 22:06:29 [Note] InnoDB: Not using CPU crc32 instructions
140216 22:06:29 [Note] InnoDB: Initializing buffer pool, size = 256.0M
140216 22:06:29 [Note] InnoDB: Completed initialization of buffer pool
140216 22:06:29 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
140216 22:06:29 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
140216 22:06:29 [Note] InnoDB: Database physically writes the file full: wait...
140216 22:06:29 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
140216 22:06:30 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2014-02-16 22:06:30 7f4114944780  InnoDB: Operating system error number 22 in a file operation.
InnoDB: Error number 22 means 'Invalid argument'.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/operating-system-error-codes.html
140216 22:06:30 [ERROR] InnoDB: File ./ib_logfile101: 'aio write' returned OS error 122. Cannot continue operation
 
Installation of system tables failed!  Examine the logs in
/var/lib/mysql for more information.
 
The problem could be conflicting information in an external
my.cnf files. You can ignore these by doing:
 
    shell> /scripts/mysql_install_db --defaults-file=~/.my.cnf
 
You can also try to start the mysqld daemon with:
 
    shell> /usr/sbin/mysqld --skip-grant --general-log &
 
and use the command line tool /usr/bin/mysql
to connect to the mysql database and look at the grant tables:
 
    shell> /usr/bin/mysql -u root mysql
    mysql> show tables
 
Try 'mysqld --help' if you have problems with paths.  Using
--general-log gives you a log in /var/lib/mysql that may be helpful.
 
The latest information about mysql_install_db is available at
https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
MariaDB is hosted on launchpad; You can find the latest source and
email lists at http://launchpad.net/maria
 
Please check all of the above before mailing us!  And remember, if
you do mail us, you should use the /usr/scripts/mysqlbug script!



 Comments   
Comment by Andrew McDonnell [ 2014-02-16 ]

This is a bit odd, because looking at mysql_install_db, $scriptdir is the shell variable that must be being set to /usr/scripts, which should only happen when $srcdir is not an empty string; but $srcdir is set to "" at the top of the script and not overridden

Comment by Andrew McDonnell [ 2014-02-16 ]

There is a second error as well:

The problem could be conflicting information in an external
my.cnf files. You can ignore these by doing:
 
    shell> /scripts/mysql_install_db --defaults-file=~/.my.cnf

This can probably be fixed with the following patch at least:

=== modified file 'scripts/mysql_install_db.sh'
--- scripts/mysql_install_db.sh	2014-02-03 14:22:39 +0000
+++ scripts/mysql_install_db.sh	2014-02-16 12:06:43 +0000
@@ -435,7 +435,7 @@
   echo "The problem could be conflicting information in an external"
   echo "my.cnf files. You can ignore these by doing:"
   echo
-  echo "    shell> /scripts/mysql_install_db --defaults-file=~/.my.cnf"
+  echo "    shell> $scriptdir/scripts/mysql_install_db --defaults-file=~/.my.cnf"
   echo
   echo "You can also try to start the mysqld daemon with:"
   echo

Generated at Thu Feb 08 07:06:17 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.