Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: Can't connect to database  (Read 5919 times)

Offline paoloeuvrard

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Can't connect to database
« on: February 06, 2014, 09:09:54 PM »
Hi,

the installation always gives me the same error:
2::warning
mysql_connect(): Access denied for user 'vietnams_paolo'@'localhost' (using password: YES) in /home/vietnams/public_html/food-delivery/core/database/mysql.php on line 46

I tested it with a basic:
<?php
$server   = "localhost";
$database = "mydatabase_cart";
$username = "mydatabase_user";
$password = "######";

$mysqlConnection = mysql_connect($server, $username, $password);
if (!$mysqlConnection)
{
  echo "Please try later.";
}
else
{
mysql_select_db($database, $mysqlConnection);
echo "everything is ok.";
}
?>

No problem. I tried to change localhost to my server address, doesn't work either.

I don't know what to do anymore.

Can somebody help?

Thanks,
Paolo

Offline llegrand

  • Hero Member
  • *****
  • Posts: 1798
  • Karma: +520/-7
    • View Profile
Re: Can't connect to database
« Reply #1 on: February 06, 2014, 10:28:30 PM »
For the database information try using the same information you use to access your FTP client.

So rather than the user for the database and that password  use  the user for the server and that password.

Under the configuration"
1.  Database Driver (choose which is is correct for your server)
2. Database Host:  localhost
3. User:  the user name that gets you into your server - not the DB user
4. Password:  the password for the user name in #3 - that gets you into your server - not the DB
5. Database Name: yourdomain_whatever-you-called-your-database
6. Database Prefix: is usually blank (empty)


This is what works for me - Hope it works for you.

Lee

 

Powered by SMFPacks Social Login Mod