如何在mysql服务器上启用此类型的命令,它是什么?
我看到了客户端代码:
//$dsn = "mysql://root@localhost/username";
//$dsn = "mysql://admin@999.69.205.174/pass";
通常我会期望:
$con=mysql_connect($db,$dbuSER,$dbpass);
解决方法:
In PHP using the PEAR::DB package to open a connection without an
external DSN (a “DSN-less connection”, i.e., using a Connection
String), the code might resemble the following:
require_once("DB.php");
//$dsn = "<driver>://<username>:<password>@<host>:<port>/<database>";
$dsn = "mysql://john:pass@localhost:port/my_db";
$db = DB::connect($dsn);
http://en.wikipedia.org/wiki/Data_Source_Name