dbTalk Databases Forums  

Error: Can't connect to MySQL server (10060)

mailing.database.mysql-plusplus mailing.database.mysql-plusplus


Discuss Error: Can't connect to MySQL server (10060) in the mailing.database.mysql-plusplus forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default Error: Can't connect to MySQL server (10060) - 05-21-2006 , 08:55 AM






------=_Part_108092_255781.1148218320850
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi all,

I've setup mysql++ to work w/ my current project (a Half-life 2 mod). It
compiles with no errors. I run the command:
mysqlpp::Connection con(true);
try
{
if(!con.connect("dbname", "hostname", "username", "password"))
....

where "dbname", "hostname", "username", and "password" are the actual
database name, hostname, username and password. I get the exception listed
in the subject line.

However, I can connect using php with the same dbname, hostname, username,
and password with no problems. What am I doing wrong here?

Thanks.

------=_Part_108092_255781.1148218320850--

Reply With Quote
  #2  
Old   
AT
 
Posts: n/a

Default Re: Error: Can't connect to MySQL server (10060) - 05-22-2006 , 02:09 PM






Oliver Gray wrote:
Quote:
where "dbname", "hostname", "username", and "password" are the actual
database name, hostname, username and password. I get the exception listed
in the subject line.
10060 is a Winsock error code, meaning that the connection timed out.
That suggests that the host name is completely incorrect, because you're
not even contacting a real host that can reject the connection.

If you're familiar with the TCP protocol, this means the SYN packet is
going out, and no SYN/ACK (or RST) is coming back.

This assumes that there are no firewalls in the way. If that's the
case, then the host name could be correct, but the firewall is dropping
the SYN packet silently. Firewalls often do this for "stealthing" reasons.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #3  
Old   
AT
 
Posts: n/a

Default Re: Error: Can't connect to MySQL server (10060) - 05-22-2006 , 09:38 PM



------=_Part_130298_12309716.1148351904673
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Thanks for the response. I was trying to connect to an sql database hosted
by godaddy, but it turns out that godaddy does not allow outside connection=
s
to it's databases. So when you buy a plan at godaddy you get sql and a
website. Only the website that godaddy hosts can access the database.

I tried a different database and it worked. So if you're using Godaddy to
host your mysql db, I think you're out of luck.

On 5/22/06, Warren Young <mysqlpp (AT) etr-usa (DOT) com> wrote:
Quote:
Oliver Gray wrote:
where "dbname", "hostname", "username", and "password" are the actual
database name, hostname, username and password. I get the exception
listed
in the subject line.

10060 is a Winsock error code, meaning that the connection timed out.
That suggests that the host name is completely incorrect, because you're
not even contacting a real host that can reject the connection.

If you're familiar with the TCP protocol, this means the SYN packet is
going out, and no SYN/ACK (or RST) is coming back.

This assumes that there are no firewalls in the way. If that's the
case, then the host name could be correct, but the firewall is dropping
the SYN packet silently. Firewalls often do this for "stealthing"
reasons.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...gmail (DOT) c=
om


------=_Part_130298_12309716.1148351904673--


Reply With Quote
  #4  
Old   
AT
 
Posts: n/a

Default Re: Error: Can't connect to MySQL server (10060) - 06-07-2006 , 09:54 PM



------=_Part_14524_2815936.1149735202909
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

I'm going to re-open this because I have setup a new database and run into
the exact same problem. I'm pretty sure that the 10060 error is due to me
not setting up the permissions correctly in the mysql table.

So far in the db table of the mysql database I've got a row where host is
"%", Db is "mydb" (the name of my database), and user is blank.

I'm not entirely sure how to setup the user table in the mysql database.

Can anyone help me figure out (or just give me an example) how to setup the
permissions correctly for a new install of mysql to allow full access to a
specific database and all it's tables from the C++ program running on any
client machine?

Thanks!

On 5/22/06, Oliver Gray <daktor (AT) gmail (DOT) com> wrote:
Quote:
Thanks for the response. I was trying to connect to an sql database
hosted by godaddy, but it turns out that godaddy does not allow outside
connections to it's databases. So when you buy a plan at godaddy you get
sql and a website. Only the website that godaddy hosts can access the
database.

I tried a different database and it worked. So if you're using Godaddy to
host your mysql db, I think you're out of luck.


On 5/22/06, Warren Young <mysqlpp (AT) etr-usa (DOT) com> wrote:

Oliver Gray wrote:
where "dbname", "hostname", "username", and "password" are the actual
database name, hostname, username and password. I get the exception
listed
in the subject line.

10060 is a Winsock error code, meaning that the connection timed out.
That suggests that the host name is completely incorrect, because you're
not even contacting a real host that can reject the connection.

If you're familiar with the TCP protocol, this means the SYN packet is
going out, and no SYN/ACK (or RST) is coming back.

This assumes that there are no firewalls in the way. If that's the
case, then the host name could be correct, but the firewall is dropping
the SYN packet silently. Firewalls often do this for "stealthing"
reasons.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe:
http://lists.mysql.com/plusplus?unsu...mail (DOT) com



------=_Part_14524_2815936.1149735202909--


Reply With Quote
  #5  
Old   
AT
 
Posts: n/a

Default Re: Error: Can't connect to MySQL server (10060) - 06-08-2006 , 02:16 AM



Oliver Gray wrote:
Quote:
Can anyone help me figure out (or just give me an example) how to setup the
permissions correctly for a new install of mysql
Please take this up on the main MySQL mailing list. This list is for
MySQL++ specific issues. What you're describing is generic to any MySQL
use.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #6  
Old   
AT
 
Posts: n/a

Default Re: Error: Can't connect to MySQL server (10060) - 06-08-2006 , 04:31 AM



------=_Part_17881_31529758.1149759005796
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Oh ok, no problem. Thanks for the quick response.

On 6/8/06, Warren Young <mysqlpp (AT) etr-usa (DOT) com> wrote:
Quote:
Oliver Gray wrote:

Can anyone help me figure out (or just give me an example) how to setup
the
permissions correctly for a new install of mysql

Please take this up on the main MySQL mailing list. This list is for
MySQL++ specific issues. What you're describing is generic to any MySQL
use.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...mail (DOT) com


------=_Part_17881_31529758.1149759005796--


Reply With Quote
  #7  
Old   
AT
 
Posts: n/a

Default Re: Error: Can't connect to MySQL server (10060) - 06-09-2006 , 12:08 AM



Oliver Gray escribió:
Quote:
I'm going to re-open this because I have setup a new database and run
into
the exact same problem. I'm pretty sure that the 10060 error is due
to me
not setting up the permissions correctly in the mysql table.

So far in the db table of the mysql database I've got a row where host is
"%", Db is "mydb" (the name of my database), and user is blank.

I'm not entirely sure how to setup the user table in the mysql database.

Can anyone help me figure out (or just give me an example) how to
setup the
permissions correctly for a new install of mysql to allow full access
to a
specific database and all it's tables from the C++ program running on any
client machine?

Thanks!

On 5/22/06, Oliver Gray <daktor (AT) gmail (DOT) com> wrote:

Thanks for the response. I was trying to connect to an sql database
hosted by godaddy, but it turns out that godaddy does not allow outside
connections to it's databases. So when you buy a plan at godaddy you
get
sql and a website. Only the website that godaddy hosts can access the
database.

I tried a different database and it worked. So if you're using
Godaddy to
host your mysql db, I think you're out of luck.


On 5/22/06, Warren Young <mysqlpp (AT) etr-usa (DOT) com> wrote:

Oliver Gray wrote:
where "dbname", "hostname", "username", and "password" are the
actual
database name, hostname, username and password. I get the exception
listed
in the subject line.

10060 is a Winsock error code, meaning that the connection timed out.
That suggests that the host name is completely incorrect, because
you're
not even contacting a real host that can reject the connection.

If you're familiar with the TCP protocol, this means the SYN packet is
going out, and no SYN/ACK (or RST) is coming back.

This assumes that there are no firewalls in the way. If that's the
case, then the host name could be correct, but the firewall is
dropping
the SYN packet silently. Firewalls often do this for "stealthing"
reasons.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe:
http://lists.mysql.com/plusplus?unsu...mail (DOT) com




Be sure that the user you are using from the C++ program was created
like this
GRANT ALL PRIVILEGES IN database.* TO 'user'@'%' identified by 'password';
This statement creates a user with name "user" and with password of
"password" giving him complete acces to a database database.


--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.