Hi all,
I am having a problem with mysql. I set up root password
set password for root@localhost=password('xxxxxxxxx'); set password for root@'xxx.yyyy.com'=password('yyyyyyyy');
after that I tried to log in, but mysql says
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) I guess that I had the right password.
My friend told me that I might have used a wrong password, so I set up new password for root. However, mysql says the exactly same thing!! ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
I was not sure about the error, so I decided to remove mysql and deleted /var/lib/mysql. After that I reinstalled mysql and set up mysql again. However, mysql again says ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) I am 100000% sure that I am using the right passward for root
I am quite puzzled by the error and need your help. Does anyone know how I can fix this problem? I am using CentOS4.3. Thank you for your help.
Cheers,
Joe ___________________________________________________ Try the New Netscape Mail Today! Virtually Spam-Free | More Storage | Import Your Contact List http://mail.netscape.com
kenkensmile@netscape.net wrote:
Hi all,
I am having a problem with mysql. I set up root password
set password for root@localhost=password('xxxxxxxxx'); set password for root@'xxx.yyyy.com'=password('yyyyyyyy');
Mysql passwords are a mantrap pit full of sharpened stakes and lizards.
I don't claim to understand the system, but I have three pieces of advice that get me out of the deathpit:
- you MUST do
flush privileges;
after messing with the privs or your messing is ignored until you restart mysqld.
- There are two kinds of password hashes in use, and they are incompatible!!! IIRC password() makes the new kind and OLD_PASSWORD() makes the older kind. Depending on the age of the client you are using to connect, it will hash your password one way or the other.
- The privilege tables are done as database tables.
use mysql; show tables;
will get you started. God help me I found it easier to mess with the privilege tables directly -- don't forget the flush -- than use the sql syntax.
Oh one more ... tables themselves have privileges separate from the general login, but I don't think that's the problem here from the error.
-Andy
On Fri, 2006-05-19 at 23:23 -0400, kenkensmile@netscape.net wrote:
Hi all,
I am having a problem with mysql. I set up root password
set password for root@localhost=password('xxxxxxxxx'); set password for root@'xxx.yyyy.com'=password('yyyyyyyy');
after that I tried to log in, but mysql says
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) I guess that I had the right password.
My friend told me that I might have used a wrong password, so I set up new password for root. However, mysql says the exactly same thing!! ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
I was not sure about the error, so I decided to remove mysql and deleted /var/lib/mysql. After that I reinstalled mysql and set up mysql again. However, mysql again says ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) I am 100000% sure that I am using the right passward for root
I am quite puzzled by the error and need your help. Does anyone know how I can fix this problem? I am using CentOS4.3. Thank you for your help.
OK ... another thing that I see frequently when dealing with this issue is the location of localhost in your /etc/hosts file ... don't ask me why, but it sometimes matters. Put the localhost name first in the line, like this:
127.0.0.1 localhost xxxxx yyyy.yyy
(where xxxxx and yyyy.yyy are the other names currently on the loopback line)
_OR_
use the first name in the /etc/hosts in the 127.0.0.1 line as the @ machine name.
The first field after the IP address is name .. the others are aliases. MySQL seems to have issues with aliases sometimes.
At least, that is my observation ...
On May 20, 2006, at 7:33, Johnny Hughes wrote:
OK ... another thing that I see frequently when dealing with this issue is the location of localhost in your /etc/hosts file ... don't ask me why, but it sometimes matters. Put the localhost name first in the line, like this:
127.0.0.1 localhost xxxxx yyyy.yyy
I've seen this cause many problems with other tools as well (not just mysql). I always thought it was wrong to include the actual hostname in the localhost line, and it's one of the first thing I change after building a system. Does any one else think it's a good idea to include the hostname in this line?
Alfred
On Sat, 2006-05-20 at 07:48 -0400, Alfred von Campe wrote:
On May 20, 2006, at 7:33, Johnny Hughes wrote:
<snip>
Put the localhost name first in the line, like this:
127.0.0.1 localhost xxxxx yyyy.yyy
I've seen this cause many problems with other tools as well (not just mysql). I always thought it was wrong to include the actual hostname in the localhost line, and it's one of the first thing I change after building a system. Does any one else think it's a good idea to include the hostname in this line?
If you mean
127.0.0.1 mynodename ...
instead of
127.0.0.1 localhost localhost.localdomain
for example?
From rom *everything* I have encountered and read (from knowledgeable folks?), only "localhost" and closely related should be there. Your "real" node name should be on a line that assigns it's real IP address.
HTH
On May 20, 2006, at 8:41, William L. Maltby wrote:
From rom *everything* I have encountered and read (from knowledgeable folks?), only "localhost" and closely related should be there. Your "real" node name should be on a line that assigns it's real IP address.
I completely agree, yet the Red Hat (and therefore CentOS) installer insists on putting the actual host name after localhost and localhost.localdomain in the loopback line of /etc/hosts (at least it did the last time I did an install from scratch, which was a while ago).
Alfred
On Sat, 2006-05-20 at 08:41 -0400, William L. Maltby wrote:
On Sat, 2006-05-20 at 07:48 -0400, Alfred von Campe wrote:
On May 20, 2006, at 7:33, Johnny Hughes wrote:
<snip>
Put the localhost name first in the line, like this:
127.0.0.1 localhost xxxxx yyyy.yyy
I've seen this cause many problems with other tools as well (not just mysql). I always thought it was wrong to include the actual hostname in the localhost line, and it's one of the first thing I change after building a system. Does any one else think it's a good idea to include the hostname in this line?
If you mean
127.0.0.1 mynodename ...
instead of
127.0.0.1 localhost localhost.localdomain
for example?
From rom *everything* I have encountered and read (from knowledgeable folks?), only "localhost" and closely related should be there. Your "real" node name should be on a line that assigns it's real IP address.
HTH
The problem is ... if you have DHCP ... you need the name of the machine in the same line, as your IP address changes
On Sat, 2006-05-20 at 10:04 -0500, Johnny Hughes wrote:
On Sat, 2006-05-20 at 08:41 -0400, William L. Maltby wrote:
On Sat, 2006-05-20 at 07:48 -0400, Alfred von Campe wrote:
On May 20, 2006, at 7:33, Johnny Hughes wrote:
<snip>
Put the localhost name first in the line, like this:
127.0.0.1 localhost xxxxx yyyy.yyy
I've seen this cause many problems with other tools as well (not just mysql). I always thought it was wrong to include the actual hostname in the localhost line, and it's one of the first thing I change after building a system. Does any one else think it's a good idea to include the hostname in this line?
If you mean
127.0.0.1 mynodename ...
instead of
127.0.0.1 localhost localhost.localdomain
for example?
From rom *everything* I have encountered and read (from knowledgeable folks?), only "localhost" and closely related should be there. Your "real" node name should be on a line that assigns it's real IP address.
HTH
The problem is ... if you have DHCP ... you need the name of the machine in the same line, as your IP address changes
<snip sig>
[hardtolove@wlmlfs08 ~]$ cat /etc/hosts # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost
This is my workstation behind an IPCop DHCP server. I have detected no problesm, but I'm only running typical workstation stuff. So there may be some apps that don't work?
This is on my IPCop firewall/gateway, which gets its IP from my cable co. DHCP server. # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost
Again, no problems. But this node *only runs IPCop and associated (https for admin, caching DNS, ntp client and server for the rest of my net).
But it appears from this and my past experience that mature applications in a networking env are OK. If one has no network...?
I'd be glad to try a couple things, if they are not to expensive in terms of change or time and report back if it helps anyone.
On Sat, 2006-05-20 at 12:49 -0400, William L. Maltby wrote:
On Sat, 2006-05-20 at 10:04 -0500, Johnny Hughes wrote:
On Sat, 2006-05-20 at 08:41 -0400, William L. Maltby wrote:
On Sat, 2006-05-20 at 07:48 -0400, Alfred von Campe wrote:
On May 20, 2006, at 7:33, Johnny Hughes wrote:
<snip>
The problem is ... if you have DHCP ... you need the name of the machine in the same line, as your IP address changes
<snip sig>
[hardtolove@wlmlfs08 ~]$ cat /etc/hosts # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost
This is my workstation behind an IPCop DHCP server. I have detected no problesm, but I'm only running typical workstation stuff. So there may be some apps that don't work?
This is on my IPCop firewall/gateway, which gets its IP from my cable co. DHCP server. # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost
Again, no problems. But this node *only runs IPCop and associated (https for admin, caching DNS, ntp client and server for the rest of my net).
But it appears from this and my past experience that mature applications in a networking env are OK. If one has no network...?
I'd be glad to try a couple things, if they are not to expensive in terms of change or time and report back if it helps anyone.
*sigh*
I see that I really should have given a 2nd thought before hitting send. All my nodes keep their nodenames ok. Even as IP changes. I can ref all nodes by node name or IP equally well. Dig and nslookup act as expected.
This is a result of taking advantage of the client's ability to keep its nodename in the configuration and that overrides my IPCop nodename that would be generated. So, I'll post in a few more moments what my configs look like.
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Sat, 2006-05-20 at 13:00 -0400, William L. Maltby wrote:
On Sat, 2006-05-20 at 12:49 -0400, William L. Maltby wrote:
On Sat, 2006-05-20 at 10:04 -0500, Johnny Hughes wrote:
On Sat, 2006-05-20 at 08:41 -0400, William L. Maltby wrote:
On Sat, 2006-05-20 at 07:48 -0400, Alfred von Campe wrote:
On May 20, 2006, at 7:33, Johnny Hughes wrote:
<snip>
The problem is ... if you have DHCP ... you need the name of the machine in the same line, as your IP address changes
<snip sig>
*sigh*
I see that I really should have given a 2nd thought before hitting send. All my nodes keep their nodenames ok. Even as IP changes. I can ref all nodes by node name or IP equally well. Dig and nslookup act as expected.
This is a result of taking advantage of the client's ability to keep its nodename in the configuration and that overrides my IPCop nodename that would be generated. So, I'll post in a few more moments what my configs look like.
<snip sig stuff>
Attached stuff from my setup. Hoping it saves aggravation for those uninterested and helps those interested.
Dennis HT Forum wrote on Sat, 20 May 2006 09:10:57 -0300:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
It's probably my program that can't deal with the MIME structure in your mail, but, anyway, please don't post HTML to mailing lists at all, it just disturbs readability and doesn't add any advantage, thanks :-)
Kai