| | |
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 34 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 |
.htaccess ajax alexa apache api array beginner binary broken cakephp checkbox class cms code cron curl database date directory display download dynamic echo email encode error fairness file files folder form forms function functions google href htaccess html image include indentedsubcategory insert integration ip java javascript joomla limit link login loop mail mail() menu mlm mod_rewrite multiple multipletables mysql newsletters oop passwords paypal pdf php problem provider query radio random recursion regex remote script search server sessions simple sms soap source space sql structure syntax system table tutorial update upload url user validation validator variable variables video web xml youtube





