Couldn’t connect to database
Database not found
PHP Warning: mysql_connect(): Access denied for user: [email protected]’ (Using password: NO)
using this:
<?php
$usr = 'PREFIX_USERNAME';
$pwd = 'PASSWORD';
$db = 'PREFIX_DATABASENAME';
$host = 'mysql.jodoshared.com';
$id = mysql_connect($host);
if(!$id)
{
echo "Couldn't connect to database";
}
mysql_select_db($db) or die('Database not found');
It worked on my local server on Windows PC and can connect to database using EMS MySql Manager.
Any idea's
www.wardead.net
Liam
PS: I am a newbie at PHP/MySql
I have Olate Download 3, first of all it is a very nice, it was working fine…
I have reinstall windows and install The script again, by the first that i put the Database name, password, where the database is. i just press “Continue”,
and the page that shows execly:
[COLOR="DeepSkyBlue"][SIZE="4"][B]Failure[/B][/SIZE]
[COLOR="DeepSkyBlue"]You must correct the error below before installation can continue:
Database Error: No database selected
[COLOR="DeepSkyBlue"]Before you try again you will need to delete the tables created by the installer,
which have the prefix "downloads_".
[Click here to go back.](javascript: history.go(-1))
But the Database works fine, other script wont work either but i can log in the MYSQL and add and remove things…
I have two seperate sights running from the same server both using the same installation of MySQL. The other website works fine and can interact with the MySQL installation without any problems.
I can access MySQL using the command line with: mysql -u root -p: ***** and the login script details within the database.php match the username and password used to access the MySQL database via command line.
I would welcome any thoughts in troubleshooting this confusing issue.