Sign in to follow this  
Followers 0
BrettF

MySQL Connection Issues

6 posts in this topic

#1 ·  Posted (edited)

Ok, So I'm try to connect to a MySQL Database on my server (exod-soft.sittingonair.com) and the password, username and database are correct, except that it won't connect. Have I miss understood it to be able to connect to a remote one? Or Is there something wrong with the way I'm connecting?

The Example:

include <mysql.au3>
$objErr = ObjEvent("AutoIt.Error","MyErrFunc")
Dim $values[5]
$values[0] = "col1"
$values[1] = "col2"
$values[2] = "col3"
$values[3] = "col4"
$values[4] = "";make sure u have one extra blank element

$sql = _MySQLConnect("exodsof_admin", "MY_PASSWORD_HERE", "exodsof_xospaces", "exod-soft.sittingonair.com", "{MySQL ODBC 3.51 Driver}", 3306);ip = 66.7.200.89
_AddRecord($sql, 'mytable', $values, $values)
_DeleteRecord($sql, "mytable", "username", "user")
_MySQLEnd($sql)

Func MyErrFunc()

$hexnum=hex($objErr.number,8)

Msgbox(0,"","We intercepted a COM Error!!"      & @CRLF                & @CRLF & _
             "err.description is: " & $objErr.description   & @CRLF & _
             "err.windescription is: " & $objErr.windescription & @CRLF & _
             "err.lastdllerror is: "   & $objErr.lastdllerror   & @CRLF & _
             "err.scriptline is: "   & $objErr.scriptline    & @CRLF & _
             "err.number is: "       & $hexnum               & @CRLF & _
             "err.source is: "       & $objErr.source        & @CRLF & _
             "err.helpfile is: "       & $objErr.helpfile      & @CRLF & _
             "err.helpcontext is: " & $objErr.helpcontext _
            )
exit
EndFunc

Where am I going wrong?? Normally, the mysql server is 'localhost' in PHP, that is obviously understandable. Please help.

Thankyou,

Brett

EDIT: What the error func displays:

We intercepted a COM Error!!

err.description is: [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'exod-soft.sittingonair.com' (10060)

err.windescription is: Unspecified error

err.lastdllerror is: 0

err.scriptline is: 27

err.number is: 80020009

err.source is: Microsoft OLE DB Provider for ODBC Drivers

err.helpfile is:

err.helpcontext is: 0

Edited by Bert

Share this post


Link to post
Share on other sites

Can you connect from the same network location using SQL Admin tools (manually)? That could be network or firewall issues. I would make sure you can connect by other means before troubleshooting a connection via AutoIt.

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

You can also test by going to Control Panel > Administrative Tools > Data Sources (ODBC)

And try adding a DSN using the MySQL driver

Share this post


Link to post
Share on other sites

Nothing responds for me on that hostname / port combination...

telnet exod-soft.sittingonair.com 3306
Connecting To exod-soft.sittingonair.com...Could not open connection to the host
, on port 3306: Connect failed

Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

Does your provider offer cpanel?? If so you can set up hosts authorized to access mysql remotely, just add your outside ip in there.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0