Remote connection to MySQL server...?

Alexander Dalloz alexander.dalloz at uni-bielefeld.de
Wed Oct 20 16:51:04 UTC 2004


Am Mi, den 20.10.2004 schrieb Christopher J. Bottaro um 18:08:

> 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

Yes, the reply by the MySQL server indicates that a connection did
happen and that the attempt was rejected by the MySQL server. Did you
really create the user using "GRANT" or "INSERT"? To be sure the new
permissions are read in run "FLUSH PRIVILEGES;" as root on the mysql
command line.

> >> 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)  |
> +-------------+---------+------------------+

Looks pretty well so far. Does the service start always report "[ FAILED
]"? You can try following: find in /etc/init.d/mysqld in the start()
function the line starting with "ping=". Exchange the DUMMY (don't
remember exactly) with mysqld. So the line looks then like:
"ping="/usr/bin/mysqladmin -u mysqld ping"

> Thank you for the help.

You are welcome.

Alexander


-- 
Alexander Dalloz | Enger, Germany | GPG key 1024D/ED695653 1999-07-13
Fedora GNU/Linux Core 2 (Tettnang) kernel 2.6.8-1.521smp 
Serendipity 18:44:08 up 15:23, 17 users, 0.14, 0.17, 0.17 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20041020/f498b9f8/attachment-0001.sig>


More information about the fedora-list mailing list