473,383 Members | 1,837 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

ERROR 1045: Access denied for user

Situation:
One common MySQL database server on SuSE 9.1 with all updates.
Uses 'rinetd'. Has entries for the appropriate IP addresses of all
servers.
NOTE: If the appropirate entries are NOT in rinetd, the error message
is:
ERROR 2013: Lost connection to MySQL server during query

Using the exact same query from prompt on several clients (some are
SuSE 9.1, some are older Redhat systems, but none are configured
identically).
Example (upper case indicates private stuff):
mysql -uUSER -pPASSWORD -h MYSQLSERVER.TLD.COM -e "select * from
sometable" DATABASENAME
returns correct results on all but one server. On that one
problemmatic server (SuSE 9.1), the result is:
ERROR 1045: Access denied for user: 'USER@localhost' (Using password:
YES)

Has anyone had a similar problem? Ideas for the soluton? I feel like
there is a missing configuration option on the problematic client, or a
missing library, or something, but have not been able to isolate
anything.

Yes, the -u and -p are the SAME from each client (this is all inside
the firewall), so I don't see how this can be a user or privileges
problem.
Anyway, I've done 'flush privileges' and I've restarted the database
server (/etc/init.d/mysqld restart), even the server has rebooted since
I first discovered the problem.

Jul 23 '05 #1
3 4114
>Situation:
One common MySQL database server on SuSE 9.1 with all updates.
Uses 'rinetd'. Has entries for the appropriate IP addresses of all
servers.
IP addresses for *what kind of* servers? More MySQL servers?
Mail servers? Web servers? IRC servers?

I'm not familiar with how you run mysqld out of rinetd.
NOTE: If the appropirate entries are NOT in rinetd, the error message
is:
ERROR 2013: Lost connection to MySQL server during query

Using the exact same query from prompt on several clients (some are
SuSE 9.1, some are older Redhat systems, but none are configured
identically).
Example (upper case indicates private stuff):
mysql -uUSER -pPASSWORD -h MYSQLSERVER.TLD.COM -e "select * from
sometable" DATABASENAME
returns correct results on all but one server.
On that one
problemmatic server (SuSE 9.1), the result is:
ERROR 1045: Access denied for user: 'USER@localhost' (Using password:
YES)
Ok, you passed in -h MYSQLSERVER.TLD.COM -uUSER, and you got back
'USER@localhost' for the user being used. Something is clearly
wrong here. Why isn't it using the correct host? You might look
around for something strange in .my.cnf files. What is the IP
address of MYSQLSERVER.TLD.COM *as determined from the host in
question*?

*IS* there a MySQL server on that host? Is it the one you actually
wish to use?
Has anyone had a similar problem? Ideas for the soluton? I feel like
Pass the correct hostname, and get it to take it, somehow.
there is a missing configuration option on the problematic client, or a
missing library, or something, but have not been able to isolate
anything.

Yes, the -u and -p are the SAME from each client (this is all inside
the firewall), so I don't see how this can be a user or privileges
problem.
Anyway, I've done 'flush privileges' and I've restarted the database
server (/etc/init.d/mysqld restart), even the server has rebooted since
I first discovered the problem.


Incidentally, as far as MySQL privilege tables are concerned, a
client connecting from localhost is not the same as a client
connecting from a public IP, so if the odd-machine-out is the one
with the MySQL server on it, -h mysqlserver.tld.com and -h localhost
are NOT equivalent in privilege tables.

Does some machine have its own machine name listed in the hosts file
with 127.0.0.1 as its IP address? That's probably a mistake.

Gordon L. Burditt
Jul 23 '05 #2
Gordon Burditt wrote:
Situation:
One common MySQL database server on SuSE 9.1 with all updates.
Uses 'rinetd'. Has entries for the appropriate IP addresses of all
servers.
IP addresses for *what kind of* servers? More MySQL servers?
Mail servers? Web servers? IRC servers?


Oops! I should say "boxes" here. These are servers (they do things
like web and e-mail. Some have MySQL server for their web server (NONE
with 'USER@localhost', see below). On some, I just used the mysql
client to test the query against MYSQLSEERVER. The problematic box is
a new box, BTW.
I inherited this system, including the rinetd configuration.
I'm not familiar with how you run mysqld out of rinetd.
my.cnf:
bind-address = 127.0.0.1

rinetd.conf:
# In this example, assume this server (MYSQLSERVER.TLD.COM) is
192.168.0.10
192.168.0.10 3306 127.0.0.1 3306
# Other boxes 192.168.0.20, 30, etc. can access this database as a
client
allow 192.168.0.20
allow 192.168.0.30
etc.
NOTE: If the appropirate entries are NOT in rinetd, the error message is:
ERROR 2013: Lost connection to MySQL server during query

Using the exact same query from prompt on several clients (some are
SuSE 9.1, some are older Redhat systems, but none are configured
identically).
Example (upper case indicates private stuff):
mysql -uUSER -pPASSWORD -h MYSQLSERVER.TLD.COM -e "select * from
sometable" DATABASENAME
returns correct results on all but one server.
On that one
problemmatic server (SuSE 9.1), the result is:
ERROR 1045: Access denied for user: 'USER@localhost' (Using password:
YES) Ok, you passed in -h MYSQLSERVER.TLD.COM -uUSER, and you got back
'USER@localhost' for the user being used. Something is clearly
wrong here. Why isn't it using the correct host? You might look
around for something strange in .my.cnf files. What is the IP
address of MYSQLSERVER.TLD.COM *as determined from the host in
question*?
I'm guessing here: It must be the rinetd implemention?

Although -h MYSQLSERVER.TLD.COM is specified when using any of the
boxes other than MYSQLSERVER.TLD.COM (localhost then), the user is
always SOMEONE (which defaults to @localhost?). The 'USER' exists ONLY
in MySQL on the MYSQLSERVER.TLD.COM box. All boxes, including the
problematic box, resolve MYSQLSERVER.TLD.COM to the correct IP address.

IF a box is NOT in rinetd, the 2013 error occurs. Except for the new
problematic box, 1045 does not occur.
*IS* there a MySQL server on that host? Is it the one you actually
wish to use?
There is NOT a MySQL server on the problematic box. I tried one, and
tried installing some of the other MySQL libraries, etc. Still same
problem.

Has anyone had a similar problem? Ideas for the soluton? I feel like Pass the correct hostname, and get it to take it, somehow. there is a missing configuration option on the problematic client, or a
missing library, or something, but have not been able to isolate
anything.

Yes, the -u and -p are the SAME from each client (this is all inside
the firewall), so I don't see how this can be a user or privileges
problem.
Anyway, I've done 'flush privileges' and I've restarted the database
server (/etc/init.d/mysqld restart), even the server has rebooted since
I first discovered the problem.


Incidentally, as far as MySQL privilege tables are concerned, a
client connecting from localhost is not the same as a client
connecting from a public IP, so if the odd-machine-out is the one
with the MySQL server on it, -h mysqlserver.tld.com and -h localhost
are NOT equivalent in privilege tables.
Is rinetd changing this?

Does some machine have its own machine name listed in the hosts file
with 127.0.0.1 as its IP address? That's probably a mistake.
All have valid IP addresses.

Gordon L. Burditt


Jul 23 '05 #3
I am not proficient at networking issues.

However, I want to raise the point that mysql has its own security system
other than that of the OS. If you cannot get access from the other machines
then it might not be the issues of mysql. You may try to test whether the
port 3306 could be connected remotely.

I have met a case that a remote program sometimes work but not all the
times. Finally, after spending quite a lot of my extra effort, I found that
the router has problem.
<ds******@pcfa.org> ¦b¶l¥ó
news:11*********************@g47g2000cwa.googlegro ups.com ¤¤¼¶¼g...
Situation:
One common MySQL database server on SuSE 9.1 with all updates.
Uses 'rinetd'. Has entries for the appropriate IP addresses of all
servers.
NOTE: If the appropirate entries are NOT in rinetd, the error message
is:
ERROR 2013: Lost connection to MySQL server during query

Using the exact same query from prompt on several clients (some are
SuSE 9.1, some are older Redhat systems, but none are configured
identically).
Example (upper case indicates private stuff):
mysql -uUSER -pPASSWORD -h MYSQLSERVER.TLD.COM -e "select * from
sometable" DATABASENAME
returns correct results on all but one server. On that one
problemmatic server (SuSE 9.1), the result is:
ERROR 1045: Access denied for user: 'USER@localhost' (Using password:
YES)

Has anyone had a similar problem? Ideas for the soluton? I feel like
there is a missing configuration option on the problematic client, or a
missing library, or something, but have not been able to isolate
anything.

Yes, the -u and -p are the SAME from each client (this is all inside
the firewall), so I don't see how this can be a user or privileges
problem.
Anyway, I've done 'flush privileges' and I've restarted the database
server (/etc/init.d/mysqld restart), even the server has rebooted since
I first discovered the problem.

Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Bruce A. Julseth | last post by:
What am I doing wrong? Do I have something set up (config file, et.al) wrong? The following is the senerio: Login as: mysql -u root Run cmd: grant all on * to fred identified by 'julebj';...
0
by: Morten Gulbrandsen | last post by:
Hi programmers, Good morning ;-) I think something is wrong, Running windows I believe first I have to set some password, Which creates some user, Then I can grant the required privileges, for...
0
by: Morten Gulbrandsen | last post by:
C:\mysql\bin>mysql -u elmasri -pnavathe company Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 29 to server version: 4.1.0-alpha-max-debug Type...
0
by: Ike_strong | last post by:
Can anyone help me to figure out why each time I try to access my database using: c:\mysql\bin\inmysql -root -p and afterwards:(i.e. after inputting my at the password prompt) Enter...
8
by: John | last post by:
Hello. I am currently working through a book on Dreamweaver and using PHP. I am having a little trouble with setting up the database though. I have php 4.2.3 and MySQL 4.0.20a. I am running...
2
by: arsisthesis | last post by:
Hi all, I have a curious problem with the ERROR 1044 and 1045: -system: OS X 10.4.3 (bash shell) -bash schell prompt: /~ kssun$ -I have set passwd to 'kssun' -I set path:...
3
by: Greg Noss | last post by:
I'm trying to install MySQL. During the security settings portion fo the setup. I keep getting a Connection Error. Error Nr. 1045 Access denied for user'root'@'localhost'(using password:YES) ...
1
usafshah
by: usafshah | last post by:
Hi I'm using linux with mysql , when i type mysql in terminal it says like: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) i'm logged in as root but...
7
by: samalphins | last post by:
I have very strange error mysqldump: Got error: 1045: Access denied for user ''@'localhost' (using p assword: YES) when trying to connect I have installed mysql freshly with blank password...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.