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

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Elisa Mattos
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
--

_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Nick Gorham-2
On 17/06/16 17:22, Elisa Mattos wrote:
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'

Unless someone here has a answer, you are likely to get more info from a MySQL list as its past unixODBC and into the driver, and looks like a MySQL issue.

Is support-hub.dimins.com the same machine as server1.com? If not I would guess the driver may not be reading the ini file.

--
Nick

_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Elisa Mattos

No, support-hub.dimins.com is 'server 2', sorry about that


On 6/17/2016 12:30 PM, Nick Gorham wrote:
On 17/06/16 17:22, Elisa Mattos wrote:
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'

Unless someone here has a answer, you are likely to get more info from a MySQL list as its past unixODBC and into the driver, and looks like a MySQL issue.

Is support-hub.dimins.com the same machine as server1.com? If not I would guess the driver may not be reading the ini file.

--
Nick


_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support


_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Mike
In reply to this post by Elisa Mattos

Turn on logging for mysql on server 2

Is there a firewall on server 2.

Nick is right , check with mysql folks to ensure server to server communication is happening

On Jun 17, 2016 8:22 AM, Elisa Mattos <[hidden email]> wrote:
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
--

_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Loading...