1
nassauer
Can't connect to my database anymore after password change
  • 2005/11/29 0:32

  • nassauer

  • Just popping in

  • Posts: 18

  • Since: 2005/1/6 1


Hello all,

I've been banging my head against the wall for a few days now, and I can't seem to fix this problem. About a week ago I attempted to change my MySQL root password, but upon doing so, I found my site could no longer access the XOOPS database. So I did the following:

1. Changed the root password in MySQL back to the old one, and the site started functioning again.

2. Realized that I never changed the password in mainfile.php, so I then changed the MySQL root password again to something new, and made the corresponding change in mainfile.php. It didn't work.

3. Once again, tried to go back to the old root password, and put the entries in mainfile.php back to what they were, and I've never been able to get my site running ever since.

I've tried changing passwords back and forth, using a fresh mainfile.php and reconfiguring it, deleting the contents of cache and templates_c, and nothing has worked.

I can access the database using MySQL directly, and there appear to be no problems with it...

What the hell?? My site has been down now for a week.

Thanks for any help!

2
jdseymour
Re: Can't connect to my database anymore after password change

Can you connect to the database through phpmyadmin?

3
nassauer
Re: Can't connect to my database anymore after password change
  • 2005/11/29 0:38

  • nassauer

  • Just popping in

  • Posts: 18

  • Since: 2005/1/6 1


Is there a way to do this even if I can't access the front page of the site nor log in?

I have not been able to thus far.

4
jdseymour
Re: Can't connect to my database anymore after password change

Any control panel with your hosting?

5
nassauer
Re: Can't connect to my database anymore after password change
  • 2005/11/29 0:46

  • nassauer

  • Just popping in

  • Posts: 18

  • Since: 2005/1/6 1


I'm hosting here locally...this is running on a Mac with OS X 10.4, MySQL 4.1.13

I have a graphical tool to access the MySQL database, and it looks fine...

6
jdseymour
Re: Can't connect to my database anymore after password change

Connects with your new password? I am trying to make sure the password you created is working.

7
nassauer
Re: Can't connect to my database anymore after password change
  • 2005/11/29 0:53

  • nassauer

  • Just popping in

  • Posts: 18

  • Since: 2005/1/6 1


Yes, it connects fine with the new password, with the MySQL root user, and verified that mainfile.php corresponds to this.

8
jdseymour
Re: Can't connect to my database anymore after password change

Double check all settings for the database make sure the format for all looks like:


define('XOOPS_DB_PASS', 'yourpassword');

Notice the single quotes.


Any errors issued, or just cannot connect to database?

9
nassauer
Re: Can't connect to my database anymore after password change
  • 2005/11/29 1:06

  • nassauer

  • Just popping in

  • Posts: 18

  • Since: 2005/1/6 1


Here's the mainfile.php output:

// Database Username
// Your database user account on the host
define('XOOPS_DB_USER', 'root');

// Database Password
// Password for your database user account
define('XOOPS_DB_PASS', 'mypassword');

(obviously "mypassword" is changed to my password)


The site spits out the standard error (you can try it at http://www.nassauer.us):


This page cannot be displayed due to an internal error.

If you are the administrator of this site, please visit the XOOPS Troubleshooting Page for assistance.

Error [Xoops]: Unable to connect to database in file class/database/databasefactory.php line 34

10
Dave_L
Re: Can't connect to my database anymore after password change
  • 2005/11/29 1:18

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


Here's a simple test script you can use: http://dev.xoops.org/modules/xfsnippet/detail.php?type=snippet&snippet_id=22

If that script works, then XOOPS should too (provided that mainfile.php is correct). And vice versa.

Login

Who's Online

447 user(s) are online (53 user(s) are browsing Support Forums)


Members: 0


Guests: 447


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Sep 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits