ankush grover
2006-Oct-17 05:04 UTC
[CentOS] ERROR 1045 (28000) when trying to login into the mysql through user test1
hey friends, I am running Mysql server version: 4.1.20 on Centos 4.0. The problem I am facing is that I am not able to access the databases if I login through anyother user for example test1 mysql -u test1 -p Enter password: ERROR 1045 (28000): Access denied for user 'test1'@'localhost' (using password: YES) I have granted all the privileges for user test1 on databases test & test1 set password for test1@'172.23.96.0/255.255.252.0'=password('test'); show grants for test1@'172.23.96.0/255.255.252.0'; +-----------------------------------------------------------------------------------------------------+ | Grants for test1 at 172.23.96.0/255.255.252.0 | +-----------------------------------------------------------------------------------------------------+ | GRANT USAGE ON *.* TO 'test1'@'172.23.96.0/255.255.252.0' IDENTIFIED BY PASSWORD '378b243e220ca493' | | GRANT ALL PRIVILEGES ON `test`.* TO 'test1'@'172.23.96.0/255.255.252.0' | | GRANT ALL PRIVILEGES ON `test1`.* TO 'test1'@'172.23.96.0/255.255.252.0' | | mysql | | test | | test1 | I want to give user test1 all the privileges on databases test and test1 and the user test1 can access mysql from any pc within the LAN that is why I have created user test1@'172.23.96.0/255.255.252.0' I can access all the databases through user root but not through user test1. SElinux and IPtables are off. I have restarted mysql few times and even restarted my system 2 times but still the problem is persisting. Please let me know if you need any further inputs. Thanks & Regards Ankush Grover
Will McDonald
2006-Oct-17 08:27 UTC
[CentOS] ERROR 1045 (28000) when trying to login into the mysql through user test1
On 17/10/06, ankush grover <ankushcentos at gmail.com> wrote:> hey friends, > > I am running Mysql server version: 4.1.20 on Centos 4.0. The problem I > am facing is that I am not able to access the databases if I login > through anyother user for example test1 > > mysql -u test1 -p > Enter password: > ERROR 1045 (28000): Access denied for user 'test1'@'localhost' (using > password: YES) > > I have granted all the privileges for user test1 on databases test & test1 > > set password for test1@'172.23.96.0/255.255.252.0'=password('test'); > > > show grants for test1@'172.23.96.0/255.255.252.0'; > +-----------------------------------------------------------------------------------------------------+ > | Grants for test1 at 172.23.96.0/255.255.252.0 > | > +-----------------------------------------------------------------------------------------------------+ > | GRANT USAGE ON *.* TO 'test1'@'172.23.96.0/255.255.252.0' IDENTIFIED > BY PASSWORD '378b243e220ca493' | > | GRANT ALL PRIVILEGES ON `test`.* TO > 'test1'@'172.23.96.0/255.255.252.0' | > | GRANT ALL PRIVILEGES ON `test1`.* TO > 'test1'@'172.23.96.0/255.255.252.0' | > > > | mysql | > | test | > | test1 | > > > I want to give user test1 all the privileges on databases test and > test1 and the user test1 can access mysql from any pc within the LAN > that is why I have created user test1@'172.23.96.0/255.255.252.0'I think the clue is in the error. "Access denied for user 'test1'@'localhost'" When you're testing your connection to the database your connecting locally using a local Unix socket (I think), try connecting to a listening TCP socket on an interface which is on the subnet you've granted access for, or grant access for 'test1'@'localhost' too. Try: [test1 at testhost]$ mysql -u test1 -D test1 -h $IP Where $IP is the address of the server on its 172.23.96.0/22 subnet. Will.
leonel at enelserver.com
2006-Oct-17 13:07 UTC
[CentOS] ERROR 1045 (28000) when trying to login into the mysql through user test1
> hey friends, > > > I am running Mysql server version: 4.1.20 on Centos 4.0. The problem I > am facing is that I am not able to access the databases if I login > through anyother user for example test1 > > > mysql -u test1 -p > Enter password: > ERROR 1045 (28000): Access denied for user 'test1'@'localhost' (using > password: YES) > > I have granted all the privileges for user test1 on databases test & test1 > > > set password for test1@'172.23.96.0/255.255.252.0'=password('test'); > > > show grants for test1@'172.23.96.0/255.255.252.0'; > +-----------------------------------------------------------------------------------------------------+ > | Grants for test1 at 172.23.96.0/255.255.252.0 > | > +-----------------------------------------------------------------------------------------------------+ > | GRANT USAGE ON *.* TO 'test1'@'172.23.96.0/255.255.252.0' IDENTIFIED > BY PASSWORD '378b243e220ca493' | > | GRANT ALL PRIVILEGES ON `test`.* TO > 'test1'@'172.23.96.0/255.255.252.0' | > | GRANT ALL PRIVILEGES ON `test1`.* TO > 'test1'@'172.23.96.0/255.255.252.0' | > > > | mysql | > | test | > | test1 | > > > I want to give user test1 all the privileges on databases test and > test1 and the user test1 can access mysql from any pc within the LAN > that is why I have created user test1@'172.23.96.0/255.255.252.0' > > I can access all the databases through user root but not through user > test1. > > > SElinux and IPtables are off. I have restarted mysql few times and > even restarted my system 2 times but still the problem is persisting. > Please let me know if you need any further inputs. > > > > Thanks & Regards > > Ankush Grover > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos >when you do a mysql -u test -p you are trying to connect to localhost from localhost grant those privileges to the localhost too leonel
Apparently Analagous Threads
- tls not working with postfix in chroot mode on centos4.0
- Need help in securing maildir so that root user should not able to read anyother user's mail
- restricting mails from "mail" command to specific domains only in postfix
- Need help in writing a shell/bash script
- Cross Network Based CD/DVD Burning Software