| | |
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 16 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 alexa apache api array beginner beneath binary broadband broken cakephp checkbox class cms code convert cron curl database date display dynamic echo email emptydisplayvalue encode error fcc file files folder form forms function functions google howtowriteathesis href htaccess html image images include insert ip javascript joomla key keywords limit link login mail mail() memberships menu mlm multiple multipletables mysql mysql_real_escape_string network oop open passwords paypal pdf php provider query radio random redirect remote rss script search securephp server sessions smtp source space sql strip_tags syntax system table template tutorial update upload url user validator variable video voteup web youtube





