On Mar 17, 2011, at 2:22 PM, Bradley Giesbrecht wrote:
$ ls -la /etc/my.cnf/etc/mysql/my.cnf/opt/local/etc/mysql5/my.cnf
~/.my.cnf
ls: /Users/davidgentry/.my.cnf: No such file or directory
ls: /etc/my.cnf/etc/mysql/my.cnf/opt/local/etc/mysql5/my.cnf: Not a
directory
There are spaces missing after each my.cnf. Try this:
$ /opt/local/lib/mysql5/bin/my_print_defaults | grep my.cnf | xargs
ls -l
We need to clean up and start over. Mysql is actually an easy
install so if you clean it up well we can have you up and running
quickly.
$ sudo port unload mysql5-server
$ sudo port uninstall mysql5-server
$ sudo port uninstall mysql5
Below we will move things out of the way. You can delete them if
there is not data to worry about preserving.
$ sudo mv /usr/local /usr/local_moved
$ sudo mv /etc/my.cnf /etc/my.cnf_moved
$ sudo mv /etc/mysql /etc/mysql_moved
$ 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
Note about next command: press enter at password prompt.
$ mysql5 -u root -p
mysql> show databases;
mysql> exit;
Now create your root password if you like.
$ mysqladmin5 -p -u root password 'new-password'
I had a mysql conf file at ~/.my.cnf with a username and password
declaration. After removing this file the -p above was no longer.
The mysql5 port and mysql in general behave as advertised.
--
Brad
_______________________________________________
macports-users mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users