Professional Web Applications Themes

Using ODBC to connect to remote MySQL server - MySQL

Hi, I have two computers on an LAN. I am trying to connect a client computer to the MySQL server. I have installed unixODBC and mysql-connector-odbc-3.51.12-1 on the server, configured /etc/odbc.ini, and can connect successfully to a database via the isql command. On the client computer I have also installed unixODBC and mysql-connector-odbc-3.51.12-1, configured /etc/odbc.ini, but can't connect to the MySQL server via the isql command. There are no firewalls involved. Details: Server - 10.1.1.x Client - 10.1.1.y /etc/odbc.ini (server) [MySQL-connect] Description = MySQL Database Connector Driver = MySQL ODBC 3.51 Driver Server = localhost Database = contacts Port = ...

  1. #1

    Default Using ODBC to connect to remote MySQL server

    Hi,

    I have two computers on an LAN. I am trying to connect a client
    computer to the MySQL server. I have installed unixODBC and
    mysql-connector-odbc-3.51.12-1 on the server, configured /etc/odbc.ini,
    and can connect successfully to a database via the isql command. On the
    client computer I have also installed unixODBC and
    mysql-connector-odbc-3.51.12-1, configured /etc/odbc.ini, but can't
    connect to the MySQL server via the isql command. There are no
    firewalls involved.

    Details:
    Server - 10.1.1.x
    Client - 10.1.1.y

    /etc/odbc.ini (server)
    [MySQL-connect]
    Description = MySQL Database Connector
    Driver = MySQL ODBC 3.51 Driver
    Server = localhost
    Database = contacts
    Port = 3306

    /etc/odbc.ini (client)
    [MySQL-connect]
    Description = MySQL Database Connector
    Driver = MySQL ODBC 3.51 Driver
    Server = 10.1.1.x
    Database = contacts
    Port = 3306

    Command:
    isql MySQL-connect -v username password

    Error messages:
    [S1T00][unixODBC][MySQL][ODBC 3.51 Driver]Can't connect to MySQL server
    on '10.1.1.x' (111)
    [ISQL]ERROR: Could not SQLConnect

    Could anyone please tell me what I have overlooked?

    Lardy.
    Lardy Guest

  2. #2

    Default Re: Using ODBC to connect to remote MySQL server

    I don't know the isql command, but there are a few things you can try:
    giving UID=<user name> and PWD=<password> in the ODBC files (I know you
    don't want to, but it is just to see if it makes a difference).
    Or puttting the Driver between cury braces:
    Driver = {MySQL ODBC 3.51 Driver}

    But before you do this, make sure that the user account you use is
    permitted to be connected remotely. If you created a user
    'guest''localhost', for example, you can only connect from the local
    machine. See the GRANT command's help for more info.

    Best regards

    Lardy wrote:
    > Hi,
    >
    > I have two computers on an LAN. I am trying to connect a client
    > computer to the MySQL server. I have installed unixODBC and
    > mysql-connector-odbc-3.51.12-1 on the server, configured /etc/odbc.ini,
    > and can connect successfully to a database via the isql command. On the
    > client computer I have also installed unixODBC and
    > mysql-connector-odbc-3.51.12-1, configured /etc/odbc.ini, but can't
    > connect to the MySQL server via the isql command. There are no
    > firewalls involved.
    >
    > Details:
    > Server - 10.1.1.x
    > Client - 10.1.1.y
    >
    > /etc/odbc.ini (server)
    > [MySQL-connect]
    > Description = MySQL Database Connector
    > Driver = MySQL ODBC 3.51 Driver
    > Server = localhost
    > Database = contacts
    > Port = 3306
    >
    > /etc/odbc.ini (client)
    > [MySQL-connect]
    > Description = MySQL Database Connector
    > Driver = MySQL ODBC 3.51 Driver
    > Server = 10.1.1.x
    > Database = contacts
    > Port = 3306
    >
    > Command:
    > isql MySQL-connect -v username password
    >
    > Error messages:
    > [S1T00][unixODBC][MySQL][ODBC 3.51 Driver]Can't connect to MySQL server
    > on '10.1.1.x' (111)
    > [ISQL]ERROR: Could not SQLConnect
    >
    > Could anyone please tell me what I have overlooked?
    >
    > Lardy.
    Dikkie Dik Guest

  3. #3

    Default Re: Using ODBC to connect to remote MySQL server

    Thanks for your input Dikkie. I just worked out the solution about 5
    minutes before you posted, but you beat me to this post.

    The important bit of information that I neglected to include in my
    original post was that I had installed MySQL 4.1.12 from the Mandriva
    2006Free distribution. I had inspected the /etc/my.cnf for the
    --skip-networking option but it was clear. After some Googling I found
    this page
    ([url]http://dev.mysql.com/doc/refman/5.1/en/can-not-connect-to-server.html[/url])
    and a comment from Jeff Crowe that pointed me in the right direction.
    With this particular installation you must comment out the
    MYSQLD_OPTIONS="--skip-networking" from /etc/sysconfig/mysqld.

    Lardy.



    Dikkie Dik wrote:
    > I don't know the isql command, but there are a few things you can try:
    > giving UID=<user name> and PWD=<password> in the ODBC files (I know you
    > don't want to, but it is just to see if it makes a difference).
    > Or puttting the Driver between cury braces:
    > Driver = {MySQL ODBC 3.51 Driver}
    >
    > But before you do this, make sure that the user account you use is
    > permitted to be connected remotely. If you created a user
    > 'guest''localhost', for example, you can only connect from the local
    > machine. See the GRANT command's help for more info.
    >
    > Best regards
    >
    > Lardy wrote:
    >> Hi,
    >>
    >> I have two computers on an LAN. I am trying to connect a client
    >> computer to the MySQL server. I have installed unixODBC and
    >> mysql-connector-odbc-3.51.12-1 on the server, configured
    >> /etc/odbc.ini, and can connect successfully to a database via the isql
    >> command. On the client computer I have also installed unixODBC and
    >> mysql-connector-odbc-3.51.12-1, configured /etc/odbc.ini, but can't
    >> connect to the MySQL server via the isql command. There are no
    >> firewalls involved.
    >>
    >> Details:
    >> Server - 10.1.1.x
    >> Client - 10.1.1.y
    >>
    >> /etc/odbc.ini (server)
    >> [MySQL-connect]
    >> Description = MySQL Database Connector
    >> Driver = MySQL ODBC 3.51 Driver
    >> Server = localhost
    >> Database = contacts
    >> Port = 3306
    >>
    >> /etc/odbc.ini (client)
    >> [MySQL-connect]
    >> Description = MySQL Database Connector
    >> Driver = MySQL ODBC 3.51 Driver
    >> Server = 10.1.1.x
    >> Database = contacts
    >> Port = 3306
    >>
    >> Command:
    >> isql MySQL-connect -v username password
    >>
    >> Error messages:
    >> [S1T00][unixODBC][MySQL][ODBC 3.51 Driver]Can't connect to MySQL
    >> server on '10.1.1.x' (111)
    >> [ISQL]ERROR: Could not SQLConnect
    >>
    >> Could anyone please tell me what I have overlooked?
    >>
    >> Lardy.
    Lardy Guest

Similar Threads

  1. Replies: 0
    Last Post: January 29th, 02:03 PM
  2. Net::SSH::Perl to connect to a remote server via a web page
    By Christian Caron in forum PERL Modules
    Replies: 0
    Last Post: August 30th, 01:02 PM
  3. Replies: 1
    Last Post: January 27th, 02:49 AM
  4. Replies: 0
    Last Post: January 24th, 10:55 PM
  5. CRASH: when trying to connect to remote server(mac)
    By Azryth webforumsuser@macromedia.com in forum Macromedia Dreamweaver
    Replies: 1
    Last Post: July 19th, 10:35 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139