View previous topic :: View next topic |
Author |
Message |
soloyo -
Joined: 21 Mar 2004 Posts: 2
|
Posted: Sun Mar 21, 2004 1:30 pm Post subject: DataBase Problem |
|
|
when i try to go to my site it says this message
Unable to connect to the database server at this time.
this si what i have to fill in i got the admin login name and pass but when i fill in the database which is ea it still posts that error can anyone help???
<?php
$dbnews = @mysql_connect("localhost", "DBUSERNAME", "DBPASSWORD");
if (!$dbnews) {
echo( "<p>Unable to connect to the " .
"database server at this time.</p>"
);
exit();
}
// Select the database
if (! @mysql_select_db("DATABASENAME") ) {
echo( "<p>Unable to locate the database " .
"at this time.</p>"
);
exit();
}
?> |
|
Back to top |
|
 |
eznetlinks -
Joined: 27 Sep 2003 Posts: 144
|
Posted: Sun Mar 21, 2004 2:37 pm Post subject: |
|
|
hi soloyo,
Open php.ini and make the following change:
default-
[SQL]
sql.safe_mode = Off
Change to-
[SQL]
sql.safe_mode = On
after months of trying i made my first sql connection last week after making the change. hope it helps you. If not Sorry. :roll: |
|
Back to top |
|
 |
iNaNimAtE -
Joined: 05 Nov 2003 Posts: 2381 Location: Everywhere you're not.
|
Posted: Mon Mar 22, 2004 3:03 am Post subject: |
|
|
Make sure you're trying to connect to the right database. Download phpMyAdmin and check the database name (the default is "mysql" so try that before you download phpMyAdmin). _________________ Bienvenidos! |
|
Back to top |
 |
 |
|