Re: Remote connection to MySQL server...?

From: Christopher J. Bottaro (cjbottaro_at_alumni.cs.utexas.edu)
Date: 10/20/04

  • Next message: Thomas Cameron: "Re: Fedora Core 2 Upgraded Kernel Won't Boot"
    To: fedora-list@redhat.com
    Date: Wed, 20 Oct 2004 11:08:18 -0500
    
    

    Alexander Dalloz wrote:

    > Am Mi, den 20.10.2004 schrieb Christopher J. Bottaro um 17:12:
    >
    >> First off, I can't remotely connect to the database. I did:
    >
    > Be aware that this can be a security problem. The communication between
    > the client and the MySQL server is 'sniffable'.

    Thanks for the heads up.

    >> That added a corresponding entry into mysql.user, but when I try to
    >> connect by a remote machine via tora, it says it can't open a connection.
    >> Connecting via tora on the localhost works fine. Do I need a specific
    >> port open on my firewall?
    >
    > Yes, port 3306 (that is default) has to be open. Second, your MySQL user
    > must be explictly allowed to connect from remote. This is done within
    > the user management of MySQL. It is a difference for MySQL whether a
    > user tries to connect from localhost, a specific other host or any other
    > host.
    >
    > http://dev.mysql.com/doc/mysql/en/User_Account_Management.html

    Port 3306 is open and /etc/my.cnf has a line "port = 3306" in the [mysqld]
    section. Yes, I've read the mysql manual and I *think* I've setup my user
    to be able to connect from the remote host. Here is the relevant portion
    of my mysql.user table:

    +-------------+---------+------------------+
    | Host | User | Password |
    +-------------+---------+------------------+
    | aa.bb.cc.dd | pymymud | (hashed passwd) |
    +-------------+---------+------------------+

    Then from aa.bb.cc.dd, I try to connect:

    mysql -u pymymud -p -h <ipaddr of mysql server> -P 3306 pymymud
    ERROR 1130: Host 'aa.bb.cc.dd' is not allowed to connect to this MySQL
    server

    >> My second problem is really more a nuisance than a real problem. When I
    >> execute "service mysqld start", it sits there for a while then finally
    >> says
    >> about timing out then [failed]. Well, it didn't fail cuz I can connect
    >> and use the database just fine...so whats up with the failure message
    >> (and semi long wait for the "timeout")?
    >
    > It is the routine in the init script checking whether the daemon is
    > running and responding. Did you set a password for the MySQL root user
    > and deleted the anonymous user?

    Yes, I changed the password of the root MySQL user. I didn't delete the
    anonymous users, but I did change the passwords for them. Here is (part
    of) my mysql.user table:

    +-------------+---------+------------------+
    | Host | User | Password |
    +-------------+---------+------------------+
    | localhost | root | (hashed passwd) |
    | semaphore | root | (hashed passwd) |
    | localhost | | (hashed passwd) |
    | semaphore | | (hashed passwd) |
    | localhost | pymymud | (hashed passwd) |
    | aa.bb.cc.dd | pymymud | (hashed passwd) |
    +-------------+---------+------------------+

    Thank you for the help.

    -- 
    fedora-list mailing list
    fedora-list@redhat.com
    To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
    

  • Next message: Thomas Cameron: "Re: Fedora Core 2 Upgraded Kernel Won't Boot"

    Relevant Pages

    • [NEWS] Weak MySQL Default Configuration
      ... MySQL is an open-source database produced by ... NULL root Password ... any host, without password. ... with the default root/NULL login, this means that anyone can remotely ...
      (Securiteam)
    • Re: Connect to table on web
      ... My web host already has mysql running on a linux box. ... Yes it is possible to connect to any sql server through the internet. ... Is your host on linux only or it has windows server as well. ...
      (borland.public.delphi.thirdpartytools.general)
    • Re: Unix accounts at Universities
      ... > It doesn't return any errors yet the prompt indicates host1. ... > it still indicates host 1 the login must have failed, ... >> As for the mysql thing, is the machine even running a mysql server? ...
      (comp.security.unix)
    • Re: Return info about PHP installation mySQL compatibility
      ... where as a SELECT VERSIONquery on the mySQL database returns ... with the mySQL library in PHP. ... the WebsiteOS program (on the website host server) lists ...
      (comp.lang.php)
    • Re: mysql ??
      ... > always has in all of the versions of mysql I've used before... ... With suse you must add the host your connecting to the server with to the ... Mark B. ...
      (alt.os.linux.suse)