Where do I find my Username, Password

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
psn
Forum Newbie
Posts: 13
Joined: Wed Jul 17, 2002 10:22 pm

Where do I find my Username, Password

Post by psn »

I want to display a database but im using it on my computer
it asks for a username
and password to show the database here is the errors
Warning: Access denied for user: 'username@localhost' (Using password: YES) in C:\apache\htdocs\planetsim\links.php on line 6

Warning: MySQL Connection Failed: Access denied for user: 'ODBC@localhost' (Using password: NO) in C:\apache\htdocs\planetsim\links.php on line 7

Warning: MySQL: A link to the server could not be established in C:\apache\htdocs\planetsim\links.php on line 7

Warning: MySQL Connection Failed: Access denied for user: 'ODBC@localhost' (Using password: NO) in C:\apache\htdocs\planetsim\links.php on line 8

Warning: MySQL: A link to the server could not be established in C:\apache\htdocs\planetsim\links.php on line 8

Warning: Supplied argument is not a valid MySQL result resource in C:\apache\htdocs\planetsim\links.php on line 9
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

If the database is on your local machine and you just did the default installation of MySQL then you can probably just do:

Code: Select all

$db_conn = mysql_connect('localhost', 'root', '') or die(mysql_error());
Mac
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

and have a look at the user managment of mysql
i.e. 4.3.1 GRANT and REVOKE Syntax and
4.3.5 Adding New Users to MySQL
Post Reply