MySQL Forums
Forum List  »  Connector/C++

Cannot connect to MySql in normal Mode on remote PC.
Posted by: Surgey Pushkin
Date: January 21, 2011 03:55AM

Hi, to be brief, my codes works on a computer I made the program,
but on another PC it only works in Safe Mode with Network, but fails in normal mode. Because I write to KEY REGISTRY Shell, I overwrite explorer.exe
So explorer.exe does not start.
However, the same program works on PC where I made this program.
I am not sure why???

MYSQL *conn;
MYSQL_RES *res;
MYSQL_ROW row;//hello

char *server = "myhosting.com";
char *user = "username";
char *password = "password"; /* set me first */
char *database = "databasename";

conn = mysql_init(NULL);

while ( !mysql_real_connect(conn, server,user, password, database, 0, NULL, 0) ){ ::MessageBox(HWND_DESKTOP,"Cannot connect to SQL","Help",MB_OK); }

So it goes to never ending loop.

So once more this code works on remote PC in safe mode with network, but fails in normal boot.

Anyone help?



Edited 3 time(s). Last edit at 01/21/2011 12:40PM by Surgey Pushkin.

Options: ReplyQuote


Subject
Views
Written By
Posted
Cannot connect to MySql in normal Mode on remote PC.
2772
January 21, 2011 03:55AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.