Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 28066 - mysql start script can't find /etc/mysql/my.cnf
Summary: mysql start script can't find /etc/mysql/my.cnf
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-06 11:24 UTC by Edulix
Modified: 2003-09-17 00:13 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
new /etc/init.d/mysql (mysql,961 bytes, application/octet-stream)
2003-09-06 11:25 UTC, Edulix
Details
new /etc/init.d/mysql (mysql,961 bytes, text/plain)
2003-09-06 11:26 UTC, Edulix
Details
new /etc/init.d/mysql (mysql,961 bytes, text/plain)
2003-09-06 11:27 UTC, Edulix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Edulix 2003-09-06 11:24:27 UTC
It's very simple;

Despite /etc/mysql/my.cnf-4.0.14-r1 exists, /etc/mysql/my.cnf doesn't, and this
is the configuration file that /etc/init.d/mysql tries to read. So even if you
already have executed:

(shell)# mysql_install_db

For the script  /etc/init.d/mysql, you haven't ! The funier is that if you tries
to run the post-configuration script:

(shell)# ebuild /var/db/pkg/dev-db/mysql-4.0.14-r1/mysql-4.0.14-r1.ebuild config

Then it tells me that the mysql db is already installed!

Steps to reproduce:

(shell)# emerge mysql (version mysql-4.0.14-r1)
(shell)# mysql_install_db
(shell)# /etc/init.d/mysql start
(it would output you the next:
 * No /etc/mysql/my.cnf file exists!
 * You dont appear to have the mysql database installed yet.
 * Please run /usr/bin/mysql_install_db to have this done...
)
(shell)# ebuild /var/db/pkg/dev-db/mysql-4.0.14-r1/mysql-4.0.14-r1.ebuild config
(and then the output of this will says just the opposite:
 * Hmm, it appears as though you already have the mysql
 * database in place.  If you are having problems trying
 * to start mysqld, perhaps you need to manually run
 * /usr/bin/mysql_install_db and/or check your config
 * file(s) and/or database(s) and/or logfile(s).
)

SOLUTIONS:
   It's very simply, you only need to create a link like this: 
(shell)# ln /etc/mysql/my.cnf-4.0.14-r1 /etc/mysql/my.cnf
   But the other solution is to change in /etc/init.d/mysql /etc/mysql/my.cnf
with /etc/mysql/my.cnf-4.0.14-r1, just like in the attachment file.

  I don't know which is the best option. maybe both of them?

   Happy codding people,
                      Edulix.
Comment 1 Edulix 2003-09-06 11:25:43 UTC
Created attachment 17171 [details]
new /etc/init.d/mysql
Comment 2 Edulix 2003-09-06 11:26:41 UTC
Created attachment 17173 [details]
new /etc/init.d/mysql
Comment 3 Edulix 2003-09-06 11:27:20 UTC
Created attachment 17175 [details]
new /etc/init.d/mysql
Comment 4 Edulix 2003-09-06 11:29:38 UTC
Comment on attachment 17173 [details]
new /etc/init.d/mysql

NOTE: the three attachmets are the equal, I sended three because the pages
gived me an error and I didn't noticed that besides the error, the attachments
had been attached.
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-09-17 00:13:09 UTC
fixed in CVS (4.0.15).
my.cnf-4.0.14-r1 should have been installed as my.cnf and that is now done correctly.