Bug #36598 compiling from source configures paths incorrectly

Submitted: 8 May 2008 16:54 Modified: 9 May 2008 17:30
Reporter: Jim Barcelona Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:5.1.24-rc OS:Linux
Assigned to: CPU Architecture:Any
Tags: configure, MySQL, path errors

[8 May 2008 16:54] Jim Barcelona
Description:

When I ran scripts/mysql_install_db I got the following error:

FATAL ERROR: Could not find /fill_help_tables.sql

The configure script in source install is ignoring the prefix of /usr/local/mysql that I set in configure. See below.

How to repeat:
I ran the following commands to compile from source:

cd /usr/local/src/mysql-5.1.24-rc
./configure --prefix=/usr/local/mysql --with-mysqld-user=mysql --with-ssl
make
make install
scripts/mysql_install_db

When I ran the last command above, scripts/mysql_install_db, I got the following error:

FATAL ERROR: Could not find /fill_help_tables.sql

I ran this to find out what the error could be:
/usr/local/libexec/mysqld –print-defaults

--port=3306 --socket=/tmp/mysql.sock --skip-locking --key_buffer=16M
--max_allowed_packet=1M --table_cache=64 --sort_buffer_size=512K
--net_buffer_length=8K --read_buffer_size=256K
--read_rnd_buffer_size=512K --myisam_sort_buffer_size=8M
--log-bin=mysql-bin --server-id=1 --user=mysql
--pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock
--port=3306 --basedir=/usr --datadir=/var/lib/mysql --tmpdir=/tmp
--language=/usr/share/mysql/english --skip-external-locking --bind-address=127.0.0.1
--key_buffer=16M --max_allowed_packet=16M --thread_stack=128K --thread_cache_size=8
--query_cache_limit=1M --query_cache_size=16M --expire_logs_days=10 --max_binlog_size=100M
--skip-bdb

Note that the path prefix of /usr/local/mysql is totally ignored!!!!

As a work around I had to do this:

./scripts/mysql_install_db --no-defaults --port=3306 --socket=/tmp/mysql.sock \
--skip-locking --key_buffer=16M --max_allowed_packet=1M --table_cache=64 \
--sort_buffer_size=512K --net_buffer_length=8K --read_buffer_size=256K  \
--read_rnd_buffer_size=512K --myisam_sort_buffer_size=8M --log-bin=mysql-bin \
--server-id=1 --user=mysql --pid-file=/var/run/mysqld/mysqld.pid \
--socket=/var/run/mysqld/mysqld.sock \
 --port=3306 --basedir=/usr/local/mysql --datadir=/usr/local/mysql/var \
--tmpdir=/tmp --language=/usr/local/mysql/share/mysql/english --skip-external-locking \
--bind-address=127.0.0.1 --key_buffer=16M --max_allowed_packet=16M \
--thread_stack=128K --thread_cache_size=8 --query_cache_limit=1M \
--query_cache_size=16M --expire_logs_days=10 --max_binlog_size=100M

Please fix your code! The above commands have worked in MySQL for 9 years.

Suggested fix:
Somebody needs to look at the configure script and fix it. The work around is above in the How to repeat section.
[9 May 2008 17:30] Susanne Ebrecht
Many thanks for writing a bug report.

The problem here is, that you have somewhere on your system a second my.cnf with a given basedir. Please check /etc and /etc/mysql.

The problem is that there is lots of Linux software outside that will additionally install a my.cnf.

And MySQL is searching first at /etc and then at other places.

Where MySQL is searching you can see by using: ./libexec/mysqld --verbose --help

For example here on my computer:
$ ./libexec/mysqld --verbose --help | less
Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /home/myhome/mysql-5.1/etc/my.cnf ~/.my.cnf

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.050 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.