Does'nt say could not connect. This is a new one for me.

Don't know what to submit other than


$MySqlHostname = ""; //the name of your host - if its local leave it as is.
$MySqlUsername = "a8271678_unet7c3"; //the username to your database.
$MySqlPassword = "pw"; //the password to your database.
$MySqlDatabase = "a8271678_lor543vi"; //the name of your database.

// do not edit below this line!!

$dblink=MYSQL_CONNECT($MySqlHostname, $MySqlUsername, $MySqlPassword) or die("Could not connect to database");
@mysql_select_db("$MySqlDatabase") or die( "Could not select database");


password modified

Recommended Answers

All 14 Replies


... or die(mysql_error());


'Fraid I have to ask exactly where to put it...


In place of the die you already have...

Could not select database


$dblink=MYSQL_CONNECT($MySqlHostname, $MySqlUsername, $MySqlPassword) or die(mysql_error());("Could not connect to database");
    @mysql_select_db("$MySqlDatabase") or die( "Could not select database");
$dblink = MYSQL_CONNECT($MySqlHostname, $MySqlUsername, $MySqlPassword) or die(mysql_error());        
mysql_select_db("$MySqlDatabase") or die(mysql_error());

Access denied for user 'a8271678_unet7c3'@'' to database 'a8271678_lor543vi'

Incorrect priviliges. Are you sure you shouldn't be using localhost as your hostname?

MySQL databases are required by many web applications including bulletin boards, content management systems, and others. To use MySQL, you need to create database and user, which will be automatically assigned to this database. Click for phpMyAdmin when database is created.

Important: MySQL Host for any database in this account is , do not use localhost!

Create new database and user, etc, etc

Ok. After you created the new user, did you flush priviliges?

Totally unfamiliar with the concept?? Other than FileZilla priviliges, like 777.

How did you create the user you are connecting with?

Not sure how to answer that...

(the etc,)
Create new database and user

MySQL database name:

MySQL user name:

Password for MySQL user:

Enter password again:

List of your current databases and users:

» MySQL Database » MySQL User » MySQL Host » Action
a8271678_lor543v a8271678_unet7c3

Delete MySQL Database and User Change MySQL user password
a8271678_uyuiyy8 a8271678_jrjjlt0

Each has the red X and the padlock icon after under Action.

I guess you are using a control panel provided by your host. If it doesn't work, contact their support. I have no experience with 000webhost.

Will do, thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.