开发者

usrname for xampp's mysql

there is a database named mysql in my xampp's mysql rdbms.....there is a table in it named widget wwhich i wish to access in my php program....开发者_运维问答 i wrote:

mysql_connect('dbname=mysql user=xampp');  

can u tell me what is the appropriate username.


from: http://us2.php.net/manual/en/function.mysql-connect.php

 resource mysql_connect ([ string $server = ini_get("mysql.default_host") [, string $username = ini_get("mysql.default_user") [, string $password = ini_get("mysql.default_password") [, bool $new_link = false [, int $client_flags = 0 ]]]]] )


use root as username. It is default username for wamp/xamp


If it's not 'xampp' then it's going to be 'root'. Yet regardless you're using mysql_connect() wrong anyhow.

mysql_connect( "localhost", "root", "" );

Will (or should) connect you using the default xampp setup.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜