| | |
Warning: mysql_connect()
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Nov 2009
Posts: 3
Reputation:
Solved Threads: 0
PHP Syntax (Toggle Plain Text)
<? $conn = mysql_connect("localhost", "your_username","your_password") or die(mysql_error()); mysql_select_db('your_database', $conn) or die(mysql_error()); ?>
this is the code i have on database.php, when i run register page i get a erro.
•
•
•
•
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'your_username'@'localhost' (using password: YES) in /home/a4595523/public_html/database.php on line 2
Access denied for user 'your_username'@'localhost' (using password: YES)
0
#2 17 Days Ago
That error means, that with the data provided you are not able to connect to a database. I do strongly think, that you specially changed the data for us not to see it, but if you really wrote then, you should use the real data, which would be able to connect you to your database. So, if is NOT the data, you are connecting with, make sure you spelled it correctly or whether such user exists on your database(if not - create one).
PHP Syntax (Toggle Plain Text)
"localhost", "your_username","your_password"
PHP Syntax (Toggle Plain Text)
"localhost", "your_username","your_password"
PHP Syntax (Toggle Plain Text)
"localhost", "your_username","your_password"
![]() |
Similar Threads
- A warning problem (PHP)
- Warning: mysql_connect() (PHP)
- Warning: mysql_connect(): Access denied (PHP)
- help with mysql_connect(); (PHP)
- mysql_connect (PHP)
Other Threads in the PHP Forum
- Previous Thread: PHP Sessions
- Next Thread: Select Menu Declaration in PHP
| Thread Tools | Search this Thread |
5.2.10 action apache api array beginner beneath binary broken cakephp checkbox class classes cms code cron curl database date destroy display dynamic echo echo$_get[x]changingitintovariable... email encode error fcc file files folder form forms function functions google header howtowriteathesis href htaccess html image images include insert ip javascript joomla limit link local login mail memberships menu mlm mod_rewrite multiple multipletables mysql mysqlquery neutrality oop open passwords paypal pdf php provider query radio random record remote rss script search server sessions sockets source space sql strip_tags syntax system table template thesishelp tutorial update upload url validator variable video voteup web window.onbeforeunload=closeme; youtube





