[MacPorts] #28772: mysql_install_db5 works without '--user=_mysql' option, but mysql.user table not populated

MacPorts noreply at macports.org
Mon Mar 14 07:30:54 PDT 2011


#28772: mysql_install_db5 works without '--user=_mysql' option, but mysql.user
table not populated
-----------------------------------+----------------------------------------
 Reporter:  knightcode1@…          |       Owner:  macports-tickets@…                   
     Type:  defect                 |      Status:  new                                  
 Priority:  Normal                 |   Milestone:                                       
Component:  ports                  |     Version:  1.9.2                                
 Keywords:                         |        Port:                                       
-----------------------------------+----------------------------------------
 When I try

 {{{
 sudo mysql_install_db5 --user=_mysql
 }}}

 or
 {{{
 sudo -u _mysql mysql_install_db5
 }}}

 I get this at the beginning of the output:

 {{{
 Installing MySQL system tables...
 ERROR: 1004  Can't create file '/var/tmp/#sqlbd1f_1_0.frm' (errno: 9)
 110314 10:20:07 [ERROR] Aborting

 110314 10:20:07 [Note] /opt/local/libexec/mysqld: Shutdown complete
 }}}

 /var/tmp has the appropriate 0777 permissions for anything to be able to
 create something there, though.

 If I do:
 {{{
 sudo mysql_install_db5
 }}}

 I get:

 {{{
 Installing MySQL system tables...
 OK
 Filling help tables...
 OK

 To start mysqld at boot time you have to copy
 support-files/mysql.server to the right place for your system

 PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
 To do so, start the server, then issue the following commands:

 /opt/local/lib/mysql5/bin/mysqladmin -u root password 'new-password'
 /opt/local/lib/mysql5/bin/mysqladmin -u root -h dhcp196.cs.pitt.edu
 password 'new-password'

 Alternatively you can run:
 /opt/local/lib/mysql5/bin/mysql_secure_installation

 which will also give you the option of removing the test
 databases and anonymous user created by default.  This is
 strongly recommended for production servers.

 See the manual for more instructions.

 You can start the MySQL daemon with:
 cd /opt/local ; /opt/local/lib/mysql5/bin/mysqld_safe &

 You can test the MySQL daemon with mysql-test-run.pl
 cd /opt/local/mysql-test ; perl mysql-test-run.pl

 Please report any problems with the /opt/local/lib/mysql5/bin/mysqlbug
 script!
 }}}

 After that, I can start the server with "sudo mysqld_safe5 &" but I'm
 unable to log into the server with "mysql -u root" or any of the
 mysqladmin commands that should be run next. If I restart the server with
 "--skip-grant-tables", I can log in and see that the 'user' table of the
 'mysql' database is empty. I'm not completely certain that it should or
 shouldn't be, but googling around seems to suggest that I should be able
 to set a root password in that table. My guess is that mysql_install_db5
 is supposed to set up that user and it isn't. Is that right?

-- 
Ticket URL: <https://trac.macports.org/ticket/28772>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list