[unixODBC-support] [S1000][unixODBC][MySQL][ODBC 5.1 Driver]Can't connect to MySQL server on 'myserver.com' (111), [ISQL]ERROR: Could not SQLConnect

Elisa Mattos emattos at dimins.com
Fri Jun 17 17:22:20 BST 2016


Hi,
I have 2 linux servers:
server 1 - Debian GNU/Linux 7.9 (wheezy)
server 2 - Debian GNU/Linux 7.8 (wheezy)

The MySQL database is in 'server 2'. It is MySQL 5.5.42
I have development tools installed in 'server 1', these tools let me 
access a database using an ODBC connection.
UnixODBC 2.2.14 is installed in 'server1'
These files are in 'server 1'

  * odbcinst.ini:

    [MySQL_Driver]
    Description     = ODBC for MySQL
    Driver          = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so
    Setup           = /usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so
    UsageCount      = 1

  * odbc.ini:

    [MySQL_DB]
    Description             = MySQL DB at server 2
    Driver          = MySQL_Driver
    Trace           = Off
    TraceFile               =
    Database                = my_database
    Server              = server1.com
    Username                = my_user
    Password                = my_pwd
    Port            =3306
    SOCKET            =

In 'server 2' I edited the file my.cnf to allow remote connections. I 
know using the wildcard character '%' is risky, but, I wanted to be sure 
the remote will be allowed

        # Instead of skip-networking the default is now to listen only on
        # localhost which is more compatible and is not less secure.
        bind-address        = %.%.%.%

I did run this command in the MySQL Monitor in 'server 2'
                      grant all on my_database.* to 'my_user'@'server 1';

and I'm getting :
                     [S1000][unixODBC][MySQL][ODBC 5.1 Driver]Can't 
connect to MySQL server on 'support-hub.dimins.com' (111)
                     [ISQL]ERROR: Could not SQLConnect

I can ping 'server 2' from 'server 1'.

I am not a linux expert, but I have the feeling I'm missing something 
quite simple, please help!!

Thanks in advance

ezml
-- 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20160617/731c948d/attachment.html>


More information about the unixODBC-support mailing list