Cannot connect to MySql server on Fedora linux

Cannot connect to MySql server on Fedora linux

am 08.02.2006 21:38:11 von smatta

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,â˜=BBV6F?J5i1YMT=3D

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

Re: Cannot connect to MySql server on Fedora linux

am 08.02.2006 22:40:24 von Bill Karwin

wrote in message
news:1139431091.088712.7100@g44g2000cwa.googlegroups.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.

Re: Cannot connect to MySql server on Fedora linux

am 10.02.2006 16:55:19 von smatta

Bill Karwin wrote:
> wrote in message
> news:1139431091.088712.7100@g44g2000cwa.googlegroups.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=A7}WxyuadT,?V6F?J5i1YMT=3D
> >
> > 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 clie=
nt
> to the server on that port indicates that the MySQL server is probably fi=
ne.
>
> 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 ser=
ver
> 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 =3D "%", 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'@'.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

Re: Cannot connect to MySql server on Fedora linux

am 10.02.2006 20:15:56 von m6s

When you changed the privileges,
did you make the flush privileges which is required?
or...
a restart to the mysql server?

Re: Cannot connect to MySql server on Fedora linux

am 10.02.2006 21:07:28 von Bill Karwin

wrote in message
news:1139586919.301163.176600@f14g2000cwb.googlegroups.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'@'.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 -u root -p

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.

Re: Cannot connect to MySql server on Fedora linux

am 10.02.2006 23:58:41 von smatta

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.