Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 523280

Summary: dev-db/mysql-init-scripts - /etc/init.d/mysql mentions /usr/bin/mysql_install_db but it is installed at /usr/share/mysql/scripts/mysql_install_db
Product: Gentoo Linux Reporter: edoceo <code>
Component: [OLD] ServerAssignee: Gentoo Linux MySQL bugs team <mysql-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description edoceo 2014-09-20 05:11:17 UTC
Doing a fresh install of dev-db/mysql-5.5.39

Then I ran the MySQL init script.

---
~ # /etc/init.d/mysql restart
 * Starting mysql ...
 * You don't appear to have the mysql database installed yet.
 * Please run /usr/bin/mysql_install_db to have this done...
 * ERROR: mysql failed to start
---

But there is no /usr/bin/mysql_install_db

The script is actually in 

---
~ # locate mysql_install_db
/usr/share/man/man1/mysql_install_db.1.bz2
/usr/share/mysql/scripts/mysql_install_db
---

I then had to manually run it like this:
---
/usr/share/mysql/scripts/mysql_install_db --basedir=/usr
---

To get it to work, if I leave off the --basedir option then the script cannot find things like my_print_defaults
Comment 1 Brian Evans (RETIRED) gentoo-dev 2014-09-21 14:35:14 UTC
You should not call this script directly.

The post-install message of mysql and other providers is to run 'emerge --config'

The message will be corrected in the next init scripts stable.

*** This bug has been marked as a duplicate of bug 491348 ***