0
我正在嘗試創建一個mysql用戶並將其分配給創建的數據庫。使用cPanel API在PHP中創建MySQL數據庫和用戶
我曾嘗試設置$ db_host作爲IP地址,FQD,本地主機(因爲我從同一臺服務器上運行)等所有這些都沒有成功。
任何意見我做錯了什麼? (xmlapi.php正在包含罰款)
include("xmlapi.php");
$db_host = "usingfullyqualifieddomain";
$cpuser = "myuser";
$cppass = "mypass";
$xmlapi = new xmlapi($db_host);
$xmlapi->set_port(2083);
$xmlapi->password_auth($cpuser,$cppass);
$xmlapi->set_debug(1);
//create database
print $xmlapi->api1_query($cpuser, "Mysql", "adddb", 'myDatabaseName');
//create user
print $xmlapi->api1_query($cpuser, "Mysql", "adduser", array('user' => 'myDBUser','pass'=>'myDBPwd'));
你有沒有得到它的解決方案? – Kvvaradha