Log into the server, and type, "use mysql;" without the quotes.

Look at the "user" table - that defines what user can connect to the database, the ip addresses they can use, and the password they must provide.

For example, you could enter,

"INSERT INTO USER (host, user, password)
values ('127.0.0.1', 'mysql', password(mysql));

and

"INSERT INTO USER (host, user, password)
values ('localhost', 'mysql', password(mysql));

Don't forget to do a "flush privileges;" afterwards (again, no quotes);

The mysql schema is thoroughly (but dryly) documented @ http://dev.mysql.com

David

Daniel McQuay wrote:
Thanks Greg, I did try that here is what happened.

boxster# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
password: NO)
boxster#

So I really just don't know what to do from here. I'm up for any ideas
if
any one has 'em.

On 5/29/06, Greg Maruszeczka <[EMAIL PROTECTED]> wrote:

On Sun, 28 May 2006 20:17:53 -0400
"Daniel McQuay" <[EMAIL PROTECTED]> wrote:

> Hello list,
>
> I just installed MySQL on my FreeBSD box here at home and am having
a
> few problems with privileges. I can connect to mysql using; mysql -u
> mysql and there is no password needed. However, when I try to
connect
> to the server using root; mysql -u root I get an error;
> <snip>
> ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
> password: NO)
> </snip>
> so reading that it appears that I need a password so i try; mysql -u
> root -p it prompts me for my root pass and when I put it in it does
> that same thing above but with (using password: YES).
>
> I went to the the MySQL web site and read 2.10.3 Securing the
Initial
> MySQL Accounts and tried following along with that but with no luck.
> When checking google for help I read a lot about the initial
> installation. Something about /usr/local/bin/mysql_install_db will
> install a privilege table.
>
> I installed mysql using this guide here
> http://raybdbomb.com/p/mysql-install-on-freebsd.html and every thing
> seemed to go well but like I said I keep getting this error. Is
there
> something else I should do? Any help on this would be MUCH
> appreciated.
>


Hi,

Wasn't clear to me in reading your post that you did this so here
goes:

Did you actually set a root password for mysql using a GRANT
statement after logging in with the default BLANK password?

mysql -u root -p [then just hit enter]

HTH,
G

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to