Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

How to setup MySQL on Server?!

Hi,

I have MySQL which works fine on my machine. I want to setup it on server. I put OK username and pass but whatever I put as host I get:

DATABASE:

Warning: Access denied for user: 'www-data@localhost' (Using password: NO) in /home/la008vma/www/home/Baza/kreiraj.php on line 3

Warning: MySQL Connection Failed: Access denied for user: 'www-data@localhost' (Using password: NO) in /home/la008vma/www/home/Baza/kreiraj.php on line 3

Warning: MySQL: A link to the server could not be established in /home/la008vma/www/home/Baza/kreiraj.php on line 3
Error creating database: Access denied for user: 'www-data@localhost' (Using password: NO)

If I wrote like this:

<?php
$host = "www.ime.com";
$username = "un";
$password = "pa";
$ladb = mysql_connect($host, $username, $password);
mysql_select_db("imebaze",$voiddb);
?>

or

<?php
$host = "localhost";
$username = "un";
$password = "pa";
$ladb = mysql_connect($host, $username, $password);
mysql_select_db("imebaze",$voiddb);
?>

I got same problem. What is problem? Username and pass is 100% OK because I got it from administrators and owner of domain.

Thanks.

LJUBA

Comments

Sign In or Register to comment.