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

Don't know what to submit other than

<?php

$MySqlHostname = "mysql1.000webhost.com"; //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
Thanks,
L-D

Try:

... or die(mysql_error());

Hi,

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

L-D

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'@'10.1.1.13' 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 mysql1.000webhost.com , 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:
a8271678_

MySQL user name:
a8271678_

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 mysql1.000webhost.com

Delete MySQL Database and User Change MySQL user password
a8271678_uyuiyy8 a8271678_jrjjlt0 mysql1.000webhost.com

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, networking, learning, and sharing knowledge.