List:MySQL++« Previous MessageNext Message »
From:Carlos Flores Date:June 9 2006 6:07am
Subject:Re: Error: Can't connect to MySQL server (10060)
View as plain text  
Oliver Gray escribió:
> 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@stripped> 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@stripped> 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?unsub=1
>> >
>> >
>>
>
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.

Thread
Error: Can't connect to MySQL server (10060)Oliver Gray21 May
  • Re: Error: Can't connect to MySQL server (10060)Warren Young22 May
    • Re: Error: Can't connect to MySQL server (10060)Oliver Gray23 May
      • Re: Error: Can't connect to MySQL server (10060)Oliver Gray8 Jun
        • Re: Error: Can't connect to MySQL server (10060)Warren Young8 Jun
          • Re: Error: Can't connect to MySQL server (10060)Oliver Gray8 Jun
        • Re: Error: Can't connect to MySQL server (10060)Carlos Flores9 Jun