473,883 Members | 1,618 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4157
>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.TL D.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******** *************@g 47g2000cwa.goog legroups.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
2718
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'; Return: Query ok, 0 rows affected (0.90 sec)
0
4597
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 some databases. However granting privileges after setting password seems to reset some Other access,
0
1193
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 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> select database(); +------------+ | database() | +------------+
0
12040
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 Password: '******' I get the following:
8
18474
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 locally with Apache 1.3.27 on Windows XP Pro. I seem to have finally got MySQL running after a lot of difficulty. In the book it says to type source C:\mysql\newland_tours.sql at the mysql> prompt, to generate the newland_tours database in my...
2
9465
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: PATH=${PATH}:/usr/local/mysql/bin - symptom 1
3
22580
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) ........ I had Zonealarm running. Changed the trusted zone security setting to low(disabled) then selected "retry" Failed again.
1
24407
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 it works when i type mysql -u root -p and then type root password.
7
6055
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 for user "root" when I am trying perform backup with mysqldump I am getting the strange error I am trying with the folowing command d:\xampp\mysql\bin\mysqldump -u -p
0
9933
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11114
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9563
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7960
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7114
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5787
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5982
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4205
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3230
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.