[plug] MySQL Server only half there

Daniel Foote freefoote at gmail.com
Mon Mar 20 14:05:07 WST 2006


> I've set myself up here so I can experiment with Ruby on Rails with
> MySQL.  Problem is, while RoR can connect to it no problem (as can
> command line mysqladmin), I can't connect to the server with any
> client software (using cocoasql).
>
> I'm running it on a G5 iMac.  Are there any config errors I need
> somewhere?  The error I get is : 192.168.2.3 can't connect to this
> server, insufficient privileges (along those lines).
>
> Also, why is my computer connecting to itself from it's IP nad not
> from Localhost/127.0.0.1??

To allow connections from another host, change the following line in my.cnf:

bind-address            = 127.0.0.1

(Obviously, though, you shouldn't have to do this if it's all local -
it should ideally use the socket and then loopback interface).

To check the access that a user has... use the command line mysql.

For example...

$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2349 to server version: 4.0.24_Debian-10sarge1-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> select User, Host from user;
+------------------+-----------+
| User             | Host      |
+------------------+-----------+
| debian-sys-maint | localhost |
| root             | localhost |
+------------------+-----------+
2 rows in set (0.00 sec)

mysql>

Note that I have removed 6 users from this output - they are not
important. One of them, though, had host set to the hostname of the
machine, which meant that that user can connect from the given host.

For ease of administration, use phpMyAdmin - http://phpmyadmin.net .
Its an all-slicing-all-dicing application when it comes to MySQL.
Really worth the miniscule effort you'll need to set it up.

Hopefully this will be of some help...

Daniel Foote.



More information about the plug mailing list