开发者

usrname for xampp's mysql

开发者 https://www.devze.com 2023-02-16 06:53 出处:网络
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:

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

精彩评论

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

关注公众号