[CentOS] ERROR 1045 (28000) when trying to login into the mysql through user test1

ankush grover

ankushcentos at gmail.com
Tue Oct 17 05:04:44 UTC 2006


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



More information about the CentOS mailing list