Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 27th November 2009, 03:34
vaio1 vaio1 is offline
Senior Member
 
Join Date: Jul 2007
Location: Italy
Posts: 664
Thanks: 77
Thanked 12 Times in 7 Posts
Default Urgent: Restore Database Users Grant Permissions

Hi Till and Falko,

How can I restore all the permissions on the MySQL Server starting from the old db_ispconfig database? Is there a script?

I have followed the Backup procedure at http://www.howtoforge.com/forums/showthread.php?t=2717 and you forgot an important thing: the MySQL database!!
I have forgotten the database with the name "mysql" and now all my customers cannot access to the database resource.

To solve this problem I have granted the permissions manually with this simple query:

Log in as root in the mysql client and execute this command:
grant all on web9db1.* to 'web9u1'@'localhost' identified by 'thepassword';

IspConfig doesn't maintain the users, db and passwords that the users create in the ISPConfig Control Panel!!
I have spent all the night to solve this problem... manually!


Last edited by vaio1; 27th November 2009 at 07:32.
Reply With Quote
Sponsored Links
  #2  
Old 27th November 2009, 11:04
Mark_NL Mark_NL is offline
Senior Member
 
Join Date: Sep 2008
Location: The Netherlands
Posts: 912
Thanks: 12
Thanked 100 Times in 96 Posts
Default

checkout the table: ispconfig.isp_isp_datenbank

all login data is there ..

run
Code:
mysql -p <ispconfigdb> -e"UPDATE <ispconfigdb>.isp_isp_datenbank SET status = 'u' WHERE status = '';"
/root/ispconfig/php/php -q /root/ispconfig/scripts/writeconf.php
Note: when doing these things, ALWAYS backup your database first (ispconfigdb and mysqldb)
Reply With Quote
  #3  
Old 27th November 2009, 11:09
vaio1 vaio1 is offline
Senior Member
 
Join Date: Jul 2007
Location: Italy
Posts: 664
Thanks: 77
Thanked 12 Times in 7 Posts
Default

Thanks for your reply!

Does this query update the Grant Permissions on the mysql database?
Code:
mysql -p <ispconfigdb> -e"UPDATE <ispconfigdb>.isp_isp_datenbank SET status = 'u' WHERE status = '';"
Reply With Quote
  #4  
Old 27th November 2009, 11:15
Mark_NL Mark_NL is offline
Senior Member
 
Join Date: Sep 2008
Location: The Netherlands
Posts: 912
Thanks: 12
Thanked 100 Times in 96 Posts
 
Default

mysql -p <ispconfigdb> -e"UPDATE <ispconfigdb>.isp_isp_datenbank SET status = 'u' WHERE status = '';"

This query will update the field "status" in the isp_isp_datenbank and set it to "u" (for update) where it's empty.


/root/ispconfig/php/php -q /root/ispconfig/scripts/writeconf.php

This script will rewrite all the user config files.

I use this method on the isp_isp_user table when i change a template config, then run the script and all user configs are according to my new template config.

Haven't tried it on a the databank table yet, but looking at uninstall.php it seems to work the same, in there (uninstall.php) they set all those status fields in the tables to "d" (mostlikely for delete ) and then run the writeconf.php file.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Clamav + samba configuration wammy28 HOWTO-Related Questions 8 31st January 2009 19:12
Cacti and ISPConfig: Monitoring Tool VMartins Tips/Tricks/Mods 11 9th August 2008 18:37
MYSQL Database restore nidhintomson Server Operation 1 23rd November 2007 15:27
Database Backup and Restore PoleCat Feature Requests 5 16th May 2007 15:36
Junk mail and spamassassin... sthompson Installation/Configuration 4 27th December 2006 16:11


All times are GMT +2. The time now is 04:37.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.