Bug #3530 | Binary install fails to start with non-default basedir and datadir | ||
---|---|---|---|
Submitted: | 21 Apr 2004 15:24 | Modified: | 28 Apr 2004 16:15 |
Reporter: | C Evans | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Installing | Severity: | S2 (Serious) |
Version: | 4.0.18 (Solaris/SPARC binary) | OS: | Solaris (Solaris 9) |
Assigned to: | Michael Widenius | CPU Architecture: | Any |
[21 Apr 2004 15:24]
C Evans
[28 Apr 2004 16:15]
Michael Widenius
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.mysql.com/documentation/ and the instructions on how to report a bug at http://bugs.mysql.com/how-to-report.php Additional info: The problem was that you forgot to set the ledir path (path where mysqld resides) in your my.cnf file. This is required if you are not using a plain binary installation. Here is what I did while testing this: #Install MySQL mkdir /local/opt cd /local/opt gtar xzf /my/mysql-4.0/mysql-4.0.19-pc-linux-i686.tar.gz mv mysql-4.0.19-pc-linux-i686 mysql #Create not default data directory ./scripts/mysql_install_db mv data /local/opt/test-data # Define paths cat > /etc/my.cnf [client] socket=/tmp/mysql.sock [mysqld_safe] basedir=/local/opt/mysql datadir=/local/opt/test-data ledir=/local/opt/mysql/bin ^D #Start mysqld ./bin/mysqld_safe &
[5 Jun 2004 0:27]
C Evans
Your comments are correct. Maybe this was just me being dense, but I must admit I found the docs unclear in this area. One reason I suspect is that the variable names "basedir" and "datadir" make (to me) intuitive sense. By comparison "ledir" doesn't, except possibly as an option for French-speaking users ;-) It also caught me out that "ledir" is an option for mysqld_safe ONLY, and (unlike most other directives) will cause startup to fail if incorrectly put in the [mysqld] section of my.cnf. Thanks for looking into this. At least now I know to be careful in this area.
[14 Dec 2005 0:54]
Phil Henningsen
I'm having the same problem.. Server: MySQL 5.0.16. In the previous instructions: <quote> #Create not default data directory ./scripts/mysql_install_db mv data /local/opt/test-data # Define paths cat > /etc/my.cnf [client] socket=/tmp/mysql.sock [mysqld_safe] basedir=/local/opt/mysql datadir=/local/opt/test-data ledir=/local/opt/mysql/bin ^D #Start mysqld ./bin/mysqld_safe & </quote> 1) I have executed /usr/bin/mysql_install_db --user=mysql 2) What is meant by "mv data /local/opt/test-data"? Where's "data"? 3) There is no /etc/my.cnf file. Do I need to create one? How does MySQL know to look there? (I previously created a /home/phil/.my.cnf file. Forgot why. Should I just delete it? Or change it?) Please help ASAP. I don't understand what's not working. I'm a newbie! Thanks, Phil Henningsen