I'm trying to write php code to access my sql database.

pretty new at this and was wondering for my hostname and username and that, do i prefix the web address to the username and password or what is it?

I geta error saying my credentials are not correct.

Can I get some input from some of you guys please.

error msg is:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user

Recommended Answers

All 2 Replies

Are you trying to access localhost ? If so, did you create a database user in you cPanel ? Show your code (remove the username/password).

It's working now, contacted the Provider help which gave me the correct details

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.