Subject: Re: mysql installation and setup
To: None <rmk@rmkhome.com>
From: matthew sporleder <msporleder@gmail.com>
List: netbsd-users
Date: 03/21/2005 10:30:00
After a freshly installed mysql, I ran the following as root:
mysqladmin -u root password 'foo'
This effectively set the password as foo.
After that, if I wanted to change the password, I did:
mysqladmin -u root -p password 'bar'
It would prompt me for the current password and then change it.

As my own user, I tried this:
mysqladmin -u root -p password 'poo'
And it worked the same way.  If there was a password set already, you
would get an error like:
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'

The error you're getting seems like the mysqld doesn't have write
access to /var/mysql.  Did you possibly start mysql manually and not
specify the -u mysql/root?  Try using the startup script, I found mine
in:
/usr/pkg/share/examples/rc.d/mysqld
and it required that I have mysql=YES in /etc/rc.conf.

Or if you want to continue starting manually, make sure you use
mysqld_safe -u mysql or whatever you like.

On Mon, 21 Mar 2005 03:00:36 -0700 (MST), Rick Kelly
<rmk@toad.rmkhome.com> wrote:
> 
> Where can I find real documentation on installing mysql from pkgsrc?
> 
> This:
> 
> PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
> This is done with:
> /usr/pkg/bin/mysqladmin -u root  password 'new-password'
> /usr/pkg/bin/mysqladmin -u root -h wolf  password 'new-password'
> See the manual for more instructions.
> 
> Does not work!!! Either as root or mysql user.
> 
> Error message:
> 
> /usr/pkg/bin/mysqladmin: unable to change password; error: 'You must have privileges to update tables in the mysql database to be able to change passwords for others'
> 
> Do I need to actually shut down the machine, connect a console and keyboard,
> and log in at the console as root?
> 
> The docs on http://dev.mysql.com/doc/mysql/en/resetting-permissions.html don't
> seem to work.
> 
> Does pkgsrc set up some kind of password that it doesn't mention?
> 
> It looks like I'll have to remove the package and then install from the
> beginning.
> --
> Rick Kelly      rmk@rmkhome.com
>                 <http://www.rmkhome.com/>
>                 <http://rkba.rmkhome.com/>
> 


-- 
_Matt