HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   General (
-   -   API Call sites_database_add (

Mosquito 23rd August 2010 18:32

API Call sites_database_add
I'm having an issue with 'sites_database_add'. I can get it to add a DB without any issue. I can see it and connect to it via phpMyAdmin. But, when I try to do a mysql_connect call, I get this error:


PHP Warning:  mysql_connect(): Access denied for user 'c7testAPI'@'localhost' (using password: YES)
These are the parameters I'm passing:

$params = array(
                        'server_id' => 1,
                        'type' => 'mysql',
                        'database_name' => 'c7testAPI',
                        'database_user' => 'c7testAPI',
                        'database_password' => 'test',
                        'database_charset' =>  'utf8',
                        'remote_access' => 'n', // n disabled - y enabled
                        'active' => 'y', // n disabled - y enabled
                        'remote_ips' => ''

Did I miss something?

till 24th August 2010 07:49

If you can connect to it with phpmyadmin with the c7testAPI user, then it is a problem of your test script and not the remoting script as phpmyadmin is a php application that connects to the databse too.

Mosquito 24th August 2010 16:39

Is there a delay between the time the API call is made and is returned and the time the database is created?

I am creating the DB and right after attempting to connect to the new DB. That is when it fails.

EDIT: To answer my own question - Yes, there is a delay. Put the script to sleep for a minute and it connects just fine.

All times are GMT +2. The time now is 10:59.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.