mysql_real_connect clarification
Date: November 18, 2008 07:41PM
hello to all.
I am having trouble on finding the meaning of this error when I execute an API
in a clustered environment:
Can't connect to MySQL server on '<management node>' (146)
When the data node and management node belongs in the same machine, the API runs
fine. But once I run the API in another machine (another data node), the error message appears. The other data node also belongs to the cluster.
I am using the following code to connect:
if (mysql_real_connect(&mysql,CONNECTSTR,DB_USER,DB_PASSW,DB_NAME,DB_PORT,
NULL,CLIENT_MULTI_STATEMENTS)== NULL)
{
printf ("Cannot establish a connection.\nReason: %s\n", mysql_error(&mysql));
exit(1);
}
where
CONNECTSTR = <hostname of the management node> (I also tried the IP address)
DB_USER = mysql (I also tried root)
DB_PASSW = ""
DB_NAME = testdatabase (existing in the DB)
DB_PORT = 3306
does someone have a similar problem?
Please advise on what to do. Thank you
|
mysql_real_connect clarification |
taro yama |
11/18/2008 07:41PM |
Sorry, you can't reply to this topic. It has been closed.
© 1995-2008 MySQL AB, 2008- Sun Microsystems, Inc.