By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,826 Members | 815 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,826 IT Pros & Developers. It's quick & easy.

Cannot connect to MySql server on Fedora linux

P: n/a
I have just installed MySql version 5.0-18 on Red Hat Fedora Core 4. It
is running but I cant connect to it using MySql Query Browser running
on my pc.
From my pc, I can telnet to the sql server / port. I get back a garbled

message:
5.0.18-standard§}WxyuadT,☻V6F?J5i1YMT=

Should this be garbled ? or is there a problem ?

How can I go about investigating this ? cause it could be a unix or
mysql server issue.
Here is the output of the msyqladmin -version command:
....

Server version 5.0.18-standard
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/lib/mysql/mysql.sock
Uptime: 2 days 3 hours 31 min 46 sec

tia,

Sunil

Feb 8 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
<sm****@acm.org> wrote in message
news:11********************@g44g2000cwa.googlegrou ps.com...
I have just installed MySql version 5.0-18 on Red Hat Fedora Core 4. It
is running but I cant connect to it using MySql Query Browser running
on my pc.

From my pc, I can telnet to the sql server / port. I get back a garbled
message:
5.0.18-standard§}WxyuadT,?V6F?J5i1YMT=

Should this be garbled ? or is there a problem ?


This is normal. The MySQL service is intended to respond to a specific
protocol, shared by the MySQL client. It is not human-readable.

The fact that you can get a response at all when you telnet from the client
to the server on that port indicates that the MySQL server is probably fine.

When you say you can't connect with MySQL Query Browser, what error do you
get? I'm guessing that you don't have a MySQL account defined on the server
that permits your client PC to connect.

See thread "ODBC not connection to database" on this newsgroup, a couple of
days ago. Your situation is probably very similar.

Regards,
Bill K.
Feb 8 '06 #2

P: n/a

Bill Karwin wrote:
<sm****@acm.org> wrote in message
news:11********************@g44g2000cwa.googlegrou ps.com...
I have just installed MySql version 5.0-18 on Red Hat Fedora Core 4. It
is running but I cant connect to it using MySql Query Browser running
on my pc.

From my pc, I can telnet to the sql server / port. I get back a garbled
message:
5.0.18-standard§}WxyuadT,?V6F?J5i1YMT=

Should this be garbled ? or is there a problem ?


This is normal. The MySQL service is intended to respond to a specific
protocol, shared by the MySQL client. It is not human-readable.

The fact that you can get a response at all when you telnet from the client
to the server on that port indicates that the MySQL server is probably fine.

When you say you can't connect with MySQL Query Browser, what error do you
get? I'm guessing that you don't have a MySQL account defined on the server
that permits your client PC to connect.

See thread "ODBC not connection to database" on this newsgroup, a couple of
days ago. Your situation is probably very similar.

Regards,
Bill K.


Thanks for this.

I checked out this post and suggestion re. privileges and I have the
privileges for root with the host = "%", with the same values for my
user id. But still cannot connect using Query Browser.

I can log in locally when I am on the same box as root and other users.
But not from a remote box. I am running Query Browser which asks for
the host/user and password. The error message is
MySQL Error Number 1045
Access denied for user 'root'@'<hostname>.localdomain' (using
password:YES).

As stated, I can telnet to the mysql server/port and get a reply back.

I dont have the mysql client on my pc. I guess I should try that also.
Sunil

Feb 10 '06 #3

P: n/a
m6s
When you changed the privileges,
did you make the flush privileges which is required?
or...
a restart to the mysql server?
Feb 10 '06 #4

P: n/a
<sm****@acm.org> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
I can log in locally when I am on the same box as root and other users.
But not from a remote box. I am running Query Browser which asks for
the host/user and password. The error message is
MySQL Error Number 1045
Access denied for user 'root'@'<hostname>.localdomain' (using
password:YES).


Are you using the same password that you use when you connect on the local
machine?

Also try this test on the Linux machine:
mysql -h <hostname> -u root -p <databasename>

Enter the actual hostname of the Linux server, not 'localhost'. This should
connect via a network connection, overriding the local-access method that
uses IPC. It'll ask for a password (due to the -p option). Enter the same
password you used in Query Browser.

The test is important because you could have different passwords for one
MySQL account, in this instance root. You can even have different passwords
per remote host. MySQL will use the entry where the host most
"specifically" matches the remote hostname. So an entry for
'root'@'hostname' will match before 'root'@'%'. Each entry can have
distinct passwords (or no passwords).

You could also have distinct privileges and passwords per database. MySQL's
privilege system is very flexible -- perhaps too flexible!

Another user (m6s) suggests using FLUSH PRIVILEGES when you change
privileges in the mysql system database. You don't need to do this if you
use GRANT & REVOKE statements; you need to do this only if you execute
INSERT/UPDATE/DELETE statements directly against the mysql system tables.

Regards,
Bill K.
Feb 10 '06 #5

P: n/a
Currently the users for this server have passwords set in the user
table with host == "%" only. No other hosts or localhost is mentioned:
i.e.
| % | root | asldkfja;lskfjd |
So this should mean that the host is a wildcard i.e. all.
I will add in a localhost entry once I can log in remotely.

However, my host doesnt have a hostname. So I gave a name to the host
and tried logging using mysql.exe client into the server two ways
(locally):

1) without the -h : I can still log into server locally.
2) with the -h and the new host name: I still get the login error
_locally_:
ERROR 1045 (28000): Access denied for user 'root'@'NYDBS1P.localdomain'
(using password: YES)

I added an entry on the localhost with its own ip and name in it and
tried the -h line again. Still the same error. I will try re-booting
the machine and then trying again.

Feb 10 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.