Website down - changed data base password


#1

I have recently been unable to login to my CMSMS. In the process of trying to reset or retrieve the username and password, I was instructed to enter a data base from the hosting site. As I have no idea what I’m doing; I’ve somehow managed to bring the site down. I need help. Here is the error message:

Database Connection Failed
Error: Access denied for user ‘nppsadmin’@‘lee.dreamhost.com’ (using password: YES) (1045)
Function Performed: CONNECT
Host/DB: mysql.northernpacificpower.com/npps_cms
Database Type: mysql

Fatal error: Attempt to connect to database npps_cms on nppsadmin@mysql.northernpacificpower.com failed in /home/etheriot/northernpacificpower.com/lib/adodb.functions.php on line 85


#2

Can you ftp or sftp into your website? If so, you could find the configuration file for whatever the application you are using and double-check your username and password for the database.

You can find the username and password in your DreamHost control-panel…go to MySQL Databases and find that database and click on the username you are using. It has a place down near the bottom that will show your password if you click it.

also, when posting your information here it is probably a good idea to substitute your username with USERNAME and domain with mydomain.com or something like that…unless you specifically want people to be looking at something on your website…


#3

Thanks for the fast response. Unfortunately I do not know what ftp or sftp means. I do know how to access MySQL databases and see the password…when I fiddled with it the website went down. I tried to correct the problem and I feel it’s getting worse. This issue is beyond my computer skill level, which is extremely poor (the person who would normally handle this situation is gone). I there some way I could get someone to walk me through a solution step by step?


#4

can you give us a few more details:

what is the web-application you are using?
is this a new installation, or was it already working and functional before it went down?
do you remember what you put in when it asked for the db info? (not the password, but the rest of the info)

Also, do you have access to your Dreamhost account? (the control panel)


#5

This is my company website that has been functional for years.
I do have access to the control panel.
I wanted to go into my CMSMS admin to make a few updates. Not sure why, but my username and password would not work. I found instructions online to “find” my username / password. I was instruction to get into MySQL databases and run some query:

UPDATE cms_users SET PASSWORD = md5(‘admin’) WHERE user_id =1;
UPDATE cms_users SET PASSWORD = ‘21232f297a57a5a743894a0e4a801fc3’ WHERE user_id = 1;

Apparently I did something wrong.


#6

I see.

Do you know what the name of the CMS is? I dont think it is Joomla or WordPress?
Do you have backups of your database?

If not, that is okay.

…or better yet, a link to where you read those instructions


#7

CMS Made Simple


#8

Cool. I have never dealt with CMS-MS, but it looks…simple.

so it looks like what you need to do is get into your webfiles and update a file called config.php

on that file is where the information and password for your database is stored. That will need to match the username and database you have.

I can try to walk you through the steps. First you will need to be able to FTP into your webfiles. You can do that a few ways, but quickest easiest way might be to go into your control panel in dreamhost. Navigate to Manage Users you should see at least one user, and on the right some links…click the link that says WebFTP.

You will need your username and password. If you do not know the password, you will need to get it…or reset that users password to something.

Once you get logged in. let me know


#9

I’m in…


#10

wonderful. You should see a list of folders, or files, or both.

I am going to guess that you see a folder called: northernpacificpower.com

If so, go into that folder. There should be a file called: config.php
right-click on that file>Open in>Source Editor

that should launch the file so you can edit it.

let me know when you are there


#11

there…


#12

okay…first off you should probably make a quick backup of all of that in case something goes wrong…

If you click your mouse somewhere in the text of that file, and then click ctrl A with your keyboard, it should highlight everything.

if everything is hightlighted, click ctrl C to copy all of that, then open a text-editor (in Windows I think it is called notepad) and paste all of that content into text-editor, then save that to your desktop. This is just in case…you can delete after you are done…

Once you have your backup made, let me know


#13

done…


#14

okay…now, back to that file.

The contents of that file will have a section that looks sort of like this (except where stars are you will have text)…your hostname might be something like: mysql.northernpacificpower.com

<?php
# CMS Made Simple Configuration File
# Documentation: /doc/CMSMS_config_reference.pdf
#
$config['dbms'] = 'mysql';
$config['db_hostname'] = 'localhost';
$config['db_username'] = '**********';
$config['db_password'] = '**********';
$config['db_name'] = '**********';
$config['db_prefix'] = 'cms_';
$config['timezone'] = 'UTC';
?>

You need to make sure that the hostname, username, database name, and password match what they actually are.


#15

corrected and saved


#16

Still seeing the same error.

In your browser, you can go to: mysql.northernpacificpower.com/npps_cms

and it will ask you for a username and password. Are you able to log in there using that same username and password?


#17

that link brings me to php myadmin…i do not see a login request. the error when trying to go to the website is as follows:

Database Connection Failed
Error: Access denied for user ‘nppsadmin’@‘lee.dreamhost.com’ (using password: YES) (1045)
Function Performed: CONNECT
Host/DB: mysql.northernpacificpower.com/npps_cms
Database Type: mysql

Fatal error: Attempt to connect to database npps_cms on nppsadmin@mysql.northernpacificpower.com failed in /home/etheriot/northernpacificpower.com/lib/adodb.functions.php on line 85


#18

Yes, if you go to that link it will bring you to phpMyadmin, which you may already be logged into. If you log out of phpMyAdmin, can you log back in using the exact same credentials that you put into that file? (same username and password)

this will determine that you have the correct information put into the config.php file


#19

yes…i logged out then back in with same credentials.
[hr]
website looks like it’s working now!!! You are AWESOME!!


#20

Okay, that is good. You at least have that correct.

If the credentials are not letting your CMS log into the database, you might want to double-check your permissions. You do this in the Control Panel of DreamHost…go to MySQL databases, you see the database with users next to it…click on that user and you have some checkboxes with permissions…just make sure they are all checked for now…make of note of any changes you make.
Also, make sure that allowable hosts is set to: %.dreamhost.com