Richard Idalski a écrit : > > I need to connect to a MySQL database from a remote machine but it seems > that when the mysql was setup, that it was only setup with localhost, and > not it's hostname. IE: When I try these commands: > > 'mysqladmin -h ren2 --port=3306 version' > I get the following : > mysqladmin: connect to server at 'ren2' failed > error: 'Can't connect to MySQL server on 'ren2' (111)' > Check that mysqld is running on ren2 and that the port is 3306. > You can check this by doing 'telnet ren2 3306' > > However if from the same machine I do: > > 'mysqladmin -h localhost --port=3306 version' > I get: > mysqladmin Ver 8.0 Distrib 3.22.32, for pc-linux-gnu on i686 > TCX Datakonsult AB, by Monty > > Server version 3.22.32 > Protocol version 10 > Connection Localhost via UNIX socket > UNIX socket /var/lib/mysql/mysql.sock > Uptime: 9 days 7 hours 25 min 52 sec > > Threads: 2 Questions: 30874532 Slow queries: 1135 Opens: 3336 Flush > tables: 7 Ope > n tables: 86 > > How can I get this to work for hostname as well as localhost, hopefully > without distrupting any of the database users? > > Thanks, > > --------------- > Richard Idalski > System Administrator > Nando Media > www.nandomedia.com > ------------------
Hi, It seems that your mysqld has been started with option 'skip-networking'. You can check that with "mysqladmin variables"; 'skip_networking' should be ON. If this is the case, you will have to find out how this option was set (either as an argument to mysqld in safe_mysqld script or defined in /etc/my.cnf), change it and restart mysqld (this will disturb your users :( ). BTW, your 'mysqladmin -h localhost --port=3306 version' command, did not check connectivity on port 3306. Since you are connecting to localhost, mysqladmin has used /var/lib/mysql/mysql.sock UNIX socket instead of a TCP/IP socket. Hope this helps -- Joseph Bueno NetClub/Trader.com --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php