problems running mysql_install_db5

Bradley Giesbrecht pixilla at macports.org
Fri Mar 18 13:04:30 PDT 2011


On Mar 18, 2011, at 10:31 AM, David Gentry wrote:

> $ /opt/local/lib/mysql5/bin/my_print_defaults | grep my.cnf |xargs  
> ls -l
> ls: /etc/mysql/my.cnf: No such file or directory
> ls: /opt/local/etc/mysql5/my.cnf: No such file or directory
> ls: ~/.my.cnf: No such file or directory
> -rw-rw-r--  1 davidgentry  admin  1616 Dec 16 21:38 /etc/my.cnf

Move this file out of the way.
$ sudo mv /etc/my.cnf /etc/my.cnf_moved

Get a clean MacPorts mysql5(-server)
$ sudo port unload mysql5-server
$ sudo port uninstall mysql5-server
$ sudo port uninstall mysql5
$ sudo mv /opt/local/var/db/mysql5 /opt/local/var/db/mysql5_moved
$ sudo port install mysql5-server
$ sudo -u _mysql mysql_install_db5
$ sudo port load mysql5-server
$ mysql5 -u root
mysql> show databases;
mysql> exit;

Now create your root password.
$ mysqladmin5 -p -u root password 'new-password'

Done.

If any step above fails, report the result BEFORE trying to fix it.

--
Brad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20110318/a482f13e/attachment.html>


More information about the macports-users mailing list