Page 1 of 1

Error ODBC connection

PostPosted: 12. November 2011 13:41
by mcendron
Hello, I installed xampp 1.7.7 on a pc with xp home sp3 and I left all the standard configuration. I installed on this computer mysql-connector-odbc 5.1.9. I created a new connection in tcp-ip I added localhost and press on tests can not connect to the database. If am referring
this operation from a different computer by entering the IP address of the machine where I installed xampp tells me: Connection Failed: [HY000] [MySQL] [ODBC 5.1 Driver] Can not connect to MySQL server on '192 .168.1.252 '(10060)
What am I doing wrong?

Re: Error ODBC connection

PostPosted: 12. November 2011 16:12
by JonB
I installed on this computer mysql-connector-odbc 5.1.9. I created a new connection in tcp-ip I added localhost and press on tests can not connect to the database


Are you referring to the same machine XAMPP is installed on???

:)

Re: Error ODBC connection

PostPosted: 12. November 2011 16:42
by Altrea
mcendron wrote:Connection Failed: [HY000] [MySQL] [ODBC 5.1 Driver] Can not connect to MySQL server on '192 .168.1.252 '(10060)

Is there a space after 192. ? :shock:

Re: Error ODBC connection

PostPosted: 13. November 2011 10:44
by mcendron
JonB wrote:
I installed on this computer mysql-connector-odbc 5.1.9. I created a new connection in tcp-ip I added localhost and press on tests can not connect to the database


Are you referring to the same machine XAMPP is installed on???

:)


We've done that test, but I was wrong to write the connection works if I enter localhost

Re: Error ODBC connection

PostPosted: 13. November 2011 10:47
by mcendron
Altrea wrote:
mcendron wrote:Connection Failed: [HY000] [MySQL] [ODBC 5.1 Driver] Can not connect to MySQL server on '192 .168.1.252 '(10060)

Is there a space after 192. ? :shock:


this is a misprint, but only in the post

Re: Error ODBC connection

PostPosted: 13. November 2011 11:08
by Sharley
Does the database have localhost set or % (Any host) set for access when you created the database
.
If locahost then that means only access from the machine that XAMPP is installed on.

If set to % (Any host) then you will be able to access the database from any location with the correct user/pass combination.

Re: Error ODBC connection

PostPosted: 13. November 2011 11:14
by mcendron
If you can help, I deleted the error log and tried to make this connection is the result:

[Sun Nov 13 11:08:59 2011] [notice] Digest: generating secret for digest authentication ...
[Sun Nov 13 11:08:59 2011] [notice] Digest: done
[Sun Nov 13 11:09:00 2011] [notice] Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Sun Nov 13 11:09:00 2011] [notice] Server built: Sep 10 2011 11:34:11
[Sun Nov 13 11:09:00 2011] [notice] Parent: Created child process 4908
[Sun Nov 13 11:09:02 2011] [notice] Digest: generating secret for digest authentication ...
[Sun Nov 13 11:09:02 2011] [notice] Digest: done
[Sun Nov 13 11:09:03 2011] [notice] Child 4908: Child process is running
[Sun Nov 13 11:09:03 2011] [notice] Child 4908: Acquired the start mutex.
[Sun Nov 13 11:09:03 2011] [notice] Child 4908: Starting 150 worker threads.
[Sun Nov 13 11:09:03 2011] [notice] Child 4908: Starting thread to listen on port 443.
[Sun Nov 13 11:09:03 2011] [notice] Child 4908: Starting thread to listen on port 80.

Re: Error ODBC connection

PostPosted: 13. November 2011 11:20
by Sharley
That log file is correct for Apache when it starts - no errors.

Re: Error ODBC connection

PostPosted: 13. November 2011 11:31
by mcendron
Sharley wrote:Does the database have localhost set or % (Any host) set for access when you created the database
.
If locahost then that means only access from the machine that XAMPP is installed on.

If set to % (Any host) then you will be able to access the database from any location with the correct user/pass combination.


This is one of the first things I checked after reading the

root - % - global - all privileges
root - 127.0.0.1 - global - all privileges

I also did the test with no password is

Re: Error ODBC connection

PostPosted: 13. November 2011 11:45
by Sharley
You created a database and who is the user for that database?

It is best if you create a user for each database and not use the super user root as this will open up security issues.

Check that you have the correct connection string.

Check using the control panel that MySQL is running.

Make sure your router, firewall and any security software is allowing access on port 3306.

See if any of these search results have a solution - you can also use your own language to make it easier to read the results.

Re: Error ODBC connection

PostPosted: 13. November 2011 12:25
by mcendron
thanks