Hi,

I'm new to the toolserver and I'm trying to install a web application[1].

I created a database on sql-s1-user to which I can connect via my PHP
code. Also I have a C program that needs to connect as well. If I call
the C program from the command line, it works perfectly. However, if it
is called from the PHP script using shell_exec() by the web server user,
I get the following error message:

Access denied for user 'ant'@'damiana-bge0.esi.toolserver.org' (using
password: NO)


Here's part of the C code:
-----
const char *_dbhost = "sql-s1-user";

MYSQL *connection, mysql;

mysql_init(&mysql);
mysql_options(&mysql, MYSQL_READ_DEFAULT_GROUP, "client");
connection = mysql_real_connect(&mysql, _dbhost, NULL, NULL, NULL, 0,
NULL, CLIENT_MULTI_STATEMENTS);

if (!connection) {
        cout << mysql_error(&mysql) << endl;
        return 1;
}
-----

Thank you very much.

ant

[1] https://github.com/antofosm/wp-revision-network

_______________________________________________
Toolserver-l mailing list ([email protected])
https://lists.wikimedia.org/mailman/listinfo/toolserver-l
Posting guidelines for this list: 
https://wiki.toolserver.org/view/Mailing_list_etiquette

Reply via email to