473,685 Members | 3,005 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 4142
>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
2709
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
4581
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
12029
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
18468
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
9435
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
22565
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
24316
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
6045
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
8507
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8761
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8773
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6431
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
5792
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
4523
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2938
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2198
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1927
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.