 |
Apache2Triad Help, Support and Development The apache2triad help , support and development forums
|
| View previous topic :: View next topic |
| Author |
Message |
GuitarGod
Joined: 28 Dec 2006
Posts: 3
|
| Posted: Fri Jan 26, 2007 7:06 pm Post subject: Can't access database |
|
|
Hello,
I've got a weird problem. None of my php scripts can access my database. Either my database details have been changed (with-out my knowledge), or my database doesn't exist (also with-out my knowledge).
How do i check if this is the case? and what do i need to do to remedy the situation?
Thanks |
|
| Back to top |
|
lku homer
Joined: 29 May 2006
Posts: 104
|
| Posted: Fri Jan 26, 2007 8:15 pm Post subject: |
|
|
First off make sure your script is correct. And for the sake of this problem make a little something like this:
Code:
<?php
mysql_connect("localhost", "dbuser", "dbpass")or die(mysql_error());
mysql_select_db("dbname")or die(mysql_error());
?>
If there is something wrong with the connection to the database, then 'mysql_error()' will tell you exactly what it is.
**Also**
Since you're in the A2T forums, I am guessing you have access to all of the MySQL files. Since you're worried about details changing, go into phpmyadmin, and change them back. |
|
| Back to top |
|
| |
|