Login problem with PHP/MySQL page

I loaded a website and SQL database that was on the domain, hollywoodcolorcontacts.com onto the domain topmodelcolorcontacts.com .  I am getting an access denied when trying to open the website from a browser.    I changed the PHP config file to use the new domain but I am still getting the same error.  Below is the part of the config file info:

("Location: login.php");

// Set the location to the admin installation here.
$CONF['site_url'] = 'http://www.domain.com/';
$CONF['admin_url'] = 'http://www.domain.com/admin/';
$CONF['admin_path'] = '/path/admin/';
$CONF['base_path'] = '/path/';
$CONF['font_path'] = '/path/htdocs/Fonts/';

//log file
$CONF['log'] = $CONF['admin_path'] . 'includes/test_misc_log';

$CONF['server_ip'] = ' ';

// Language config
$CONF['default_language'] = 'en';
// Database Config
// mysql = MySQL 3.23 and 4.0
// mysqli = MySQL 4.1
$CONF['database_type'] = 'mysqli';
$CONF['database_host'] = 'localhost';
$CONF['database_user'] = 'something';  ///this is set to equal the db name
$CONF['database_password'] = '**********';
$CONF['database_name'] = 'something';
$CONF['database_prefix'] = '';

///define session timeout
$CONF['session_timeout'] = 36000;

// Site Admin
// Define the Site Admins email address below.
$CONF['admin_email'] = 'txxxxx@xxxxx.com';
$CONF['support_email'] = 'support@hdomain.com';
$CONF['dm_email'] = 'sales@domain.com';
// Mail Server
// Hostname of the mail server.
$CONF['smtp_server'] = 'xxx.xxx.xxx.xxx';
$CONF['smtp_port'] = '25';
$CONF['smtp_timeout'] = '30';

// Page Size
// Set the number of entries that you would like to see
// in one page.
$CONF['$paging'] = array(25,50,75,100);

// Footer

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dan CraciunIT ConsultantCommented:
Access denied for user 'larry'@'localhost' (using password: YES)
This usually means your password or your user name is incorrect.

I loaded a website and SQL database
Have you also created a user and gave him rights on that SQL database?

I see you have this on your config:
$CONF['database_user'] = 'larry';  ///this is set to equal the db name

But your db name is
$CONF['database_name'] = 'HCC_admin';

Maybe this is the problem?

PS: please make this question "Private", so it's not accessible from a web search. You put a LOT of info online and if any automated (or not) bots get hold of this info you'll find pretty soon attempts to hack your site.

northernknightAuthor Commented:
I created a database user as "larry"
Dan CraciunIT ConsultantCommented:
OK. What are you using to manage your databases and users? Cpanel? Phpmyadmin?
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

northernknightAuthor Commented:
Yes, Cpanel, MySQL, and PHPmyadmin
Dan CraciunIT ConsultantCommented:
OK. In Cpanel, when you go to "MySQL Databases", do you have a db called "HCC_admin"?
And, on it's right, in the "Privileged user" column, a user named "larry"?

Most webhosts will prefix your user and db name with a string. Is this the case with your webhost?

Can you post a screenshot with the "MySQL Databases" page?
northernknightAuthor Commented:
Yes I have a database with HCC_admin and it has a prefix
I created a user called larry but I don't have "privileged users"MySQL screenshot
Dan CraciunIT ConsultantCommented:
You have this: Add User to database. Press on "Add" and you'll set up "topmodel_larry" as a privileged user for the db "topmodel_HCC_admin"

And change
$CONF['database_user'] = 'larry';  ///this is set to equal the db name
$CONF['database_password'] = '**********';
$CONF['database_name'] = 'HCC_admin';

$CONF['database_user'] = 'topmodel_larry';  
$CONF['database_password'] = '**********';
$CONF['database_name'] = 'topmodel_HCC_admin';

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
northernknightAuthor Commented:
Great, that worked!  thank you very much.  I did try using the prefix in the config file before but I never made the user privileged.
Dan CraciunIT ConsultantCommented:
You're welcome.

Glad I could help!
northernknightAuthor Commented:
Hey Dan,

Looks like the website is working fine.  I have not been able to login to the admin.  Shouldn't the admin be the topmodel_larry user and the password I created?  I tried both "larry" and "topmodel_larry"
Dan CraciunIT ConsultantCommented:
Nope. That's the user for the database.

The admin user should be different. You can usually find the name and password in the table "user" or "users" in your database, but the password will be encrypted.
northernknightAuthor Commented:
In the phpMyAdmin it has an "admin" section in the database but there is no "user" table - I see that there are 3 what looks like users in that table one in which has the name larry.

I also found an error message in the database that I have attached.
Dan CraciunIT ConsultantCommented:
I don't recognize the table names, so it's probably a custom CMS.
You should contact the original developer for the name and password of the admin user. It might be in the db or it might be hard-coded in a file.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.