Koozali.org: home of the SME Server

unable to connect to MySQL after DAR2 restore

Offline mophilly

  • *
  • 384
  • +0/-0
    • Mophilly
unable to connect to MySQL after DAR2 restore
« on: December 09, 2009, 04:01:29 AM »
I am not sure whether this is a "support" request or a bug report. If the concensus is "bug" I will submit a report. In any case, I hope someone can help me sort this out.

Due to a md Fail event, I replaced the hard drives (SFF box, two HD's, RAID1) and reinstalled SME 7.4. After the installation and configuration was complete I installed the DAR2 contrib and restored data to the machine from the backups. Web sites, email and vpn services are working fine.

However, other contribs cannot connect to MySQL. E.g. log on to phpMyAdmin returns "MySql said: #1045 - Access denied for user 'root'@'localhost' (using password: YES)" error message. I uninstalled the phpMyAdmin using yum, reinstalled, performed signal-event post-upgrade and reboot. That did not change the result.

Bug report #4773 is not the same because DAR2 is not involved. I tried changing the password per bug 4773 but that did not work in this case. Bug 5150 is similar but the report doesn't involve DAR2 and the circumstance behind the report is ambiguous.

The wiki page http://wiki.contribs.org/MySQL#Resetting_the_MySQL_root_password is tempting.

Is is possible the password for user root is different due to the clean install and subsequent restore?
- Mark

Offline mophilly

  • *
  • 384
  • +0/-0
    • Mophilly
Re: unable to connect to MySQL after DAR2 restore
« Reply #1 on: December 09, 2009, 05:04:37 AM »
I forgot to add my second question: will resetting the mysql root password cause trouble with the things that are currently working, like horde?
- Mark

Offline p-jones

  • *
  • 594
  • +0/-0
Re: unable to connect to MySQL after DAR2 restore
« Reply #2 on: December 09, 2009, 10:08:59 AM »
Quote
However, other contribs cannot connect to MySQL.

Did you reinstall the other contribs after you did the restore ?
...

Offline mophilly

  • *
  • 384
  • +0/-0
    • Mophilly
Re: unable to connect to MySQL after DAR2 restore
« Reply #3 on: December 09, 2009, 04:10:19 PM »
Did you reinstall the other contribs after you did the restore ?

No. FormTools and MediaWiki both fail on access denied from MySQL, but I have not yet reinstalled them. If phpMyAdmin cannot connect, then troubleshooting these is more difficult.
- Mark

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: unable to connect to MySQL after DAR2 restore
« Reply #4 on: December 09, 2009, 04:49:48 PM »
No. FormTools and MediaWiki both fail on access denied from MySQL, but I have not yet reinstalled them. If phpMyAdmin cannot connect, then troubleshooting these is more difficult.
Can you access mysql from the command line when logged in as root using only the following command?
Code: [Select]
mysqlThis indicates that something might have gone wrong at the end of the restore process. You should look for clues in /var/log/messages around the time you restored to see if the back-up completed with the post-backup event.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: unable to connect to MySQL after DAR2 restore
« Reply #5 on: December 09, 2009, 05:17:28 PM »
Is is possible the password for user root is different due to the clean install and subsequent restore?

Yes.

Re-configure PHPMyAdmin.

[And BTW, you posted in the wrong forum. Your problems are all with add-on software not included in the SME 7.4 CDROM.]

Offline mophilly

  • *
  • 384
  • +0/-0
    • Mophilly
Re: unable to connect to MySQL after DAR2 restore
« Reply #6 on: December 09, 2009, 05:20:50 PM »
Can you access mysql from the command line when logged in as root using only the following command?

Thank you for the reply; very much appreciated.

Yes, I can access from the command line. That revealed that some databases were not restored as I expected. I created the missing db's and reloaded the data, and now FormTools and MantisBT are working.

phpMyAdmin and MediaWiki are not working yet. The latter is very important as a client facing app. The database is populated. So, I still seek insight as to what to adjust for these two apps.
- Mark

Offline mophilly

  • *
  • 384
  • +0/-0
    • Mophilly
Re: unable to connect to MySQL after DAR2 restore
« Reply #7 on: December 09, 2009, 05:26:24 PM »
Re-configure PHPMyAdmin.

Thanks for the reply. I will look into that some more. I thought by removing the rpm and reinstalling it, the config would be taken of.
- Mark

Offline chris burnat

  • *****
  • 1,135
  • +2/-0
    • http://www.burnat.com
Re: unable to connect to MySQL after DAR2 restore
« Reply #8 on: December 09, 2009, 05:31:51 PM »
Moving to contribs section.
- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: unable to connect to MySQL after DAR2 restore
« Reply #9 on: December 09, 2009, 05:46:31 PM »
Thank you for the reply; very much appreciated.
You're welcome.

Yes, I can access from the command line. That revealed that some databases were not restored as I expected. I created the missing db's and reloaded the data, and now FormTools and MantisBT are working.
Good you got them restored, still I think you need to find out what went wrong, as backups should work, as well as restore.

phpMyAdmin and MediaWiki are not working yet. The latter is very important as a client facing app. The database is populated. So, I still seek insight as to what to adjust for these two apps.
You could try switching on the display_errors option in debugging perhaps that might yield some clues: http://wiki.contribs.org/PHP#Display_Error_Messages
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline mophilly

  • *
  • 384
  • +0/-0
    • Mophilly
Re: unable to connect to MySQL after DAR2 restore
« Reply #10 on: December 09, 2009, 06:19:16 PM »
You could try switching on the display_errors option in debugging perhaps that might yield some clues: http://wiki.contribs.org/PHP#Display_Error_Messages

Will do. Thanks for the tip. :-)
- Mark