[wplug] SQL on FreeBSD?

Bill Moran wmoran at potentialtech.com
Sun May 28 22:50:26 EDT 2006


"Daniel McQuay" <simplebob at gmail.com> wrote:

> Hello list,
> 
> I'm not exactly sure if this a question for this list or MySQL but here goes
> it.
> 
> I just installed the mysql from ports using this howto (
> http://raybdbomb.com/p/mysql-install-on-freebsd.html) and all seemed to go
> well. I then ran /usr/local/bin/mysql_install_db. And then started mysql.
> When I try to start mysql with mysql -u root -p and put my password in I
> get: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
> password: YES), but I am able to use mysql -u mysql and get in and mess
> around but with limited privileges.
> 
> I checked out the MySQL documentation and it told me to do: mysqladmin -u
> root -h boxster.mydomain.com password "my_new_password", but after I do that
> the terminal hands and the only way I can break it is with control z. When I
> do that though, it opens another process of mysql but now with mysqladmin
> running as root, according to top at the shell prompt.
> 
> Oh, and when I run ps auxw |grep mysqld the out put looks like this:
> 
> <snip>
> boxster# ps auxw |grep mysqld
> root    769  0.0  0.1  1440   592  p0  R+   10:31PM   0:00.01 grep mysqld
> mysql   473  0.0  0.2  1660  1196 con- I     9:33PM   0:00.07 /bin/sh
> /usr/local/bin/mysqld_safe --user=mysql --datadir=/var/db/mys
> mysql   520  0.0  4.5 56748 26132 con- S     9:33PM
> 0:13.93/usr/local/libexec/mysqld --basedir=/usr/local
> --datadir=/var/db/mysq
> boxster#
> </snip>
> 
> I noticed that --datadir= goes to /var/db/mys and /var/db/mysq but there's
> no such directories named mys and mysq. Just in case this was the error I
> made both of those directories but I'm suspicious of that.

Those directories must have the database files in them.  You can't just
create them.  Looks like you typed in commands wrong.

The last few steps are incorrect anyway.  You shouldn't be manually starting
mysqld.  Read through /usr/local/etc/rc.d/msyqld.sh (or whatever it's
called) and put the correct configuration values in /etc/rc.conf.  Then
execute the rc script to start/stop it.

-- 
Bill Moran

I lay down for a while, and I woke up on the ocean,
floating on my back, and staring at the grey.
It was completely still, 'cept for the pounding of my heart,
was bring me back to life, from three strange days.



More information about the wplug mailing list