# HG changeset patch # User rejo # Date 1213308046 0 # Node ID e17c8536d71878ca436e8f1c5e84f8e8bde62d5b # Parent 5a2d4418385d531dcc6858712b277996f5c3f91f [feladat @ 288] Fixed GRANT statement installer to give working example, even if web interface and database are on different server. Closes #67. diff -r 5a2d4418385d -r e17c8536d718 install/index.php --- a/install/index.php Sat Jun 07 10:51:11 2008 +0000 +++ b/install/index.php Thu Jun 12 22:00:46 2008 +0000 @@ -200,6 +200,7 @@ $db_name = $_POST['db_name']; $db_type = $_POST['db_type']; $pa_pass = $_POST['pa_pass']; + $pa_srvr = getenv('SERVER_NAME'); $dns_hostmaster = $_POST['dns_hostmaster']; $dns_ns1 = $_POST['dns_ns1']; $dns_ns2 = $_POST['dns_ns2']; @@ -207,7 +208,7 @@ echo "
" . _('You now want to give limited rights to Poweradmin so it can update the data in the tables. To do this, you should create a new user and give it rights to select, delete, insert and update records in the PowerDNS database.') . " "; if ($db_type == 'mysql') { echo _('In MySQL you should now perform the following command:') . "
"; - echo "GRANT SELECT, INSERT, UPDATE, DELETE
ON " . $db_name . ".*
TO '" . $db_user . "'@'" . $db_host . "'
IDENTIFIED BY '" . $db_pass . "';
GRANT SELECT, INSERT, UPDATE, DELETE
ON " . $db_name . ".*
TO '" . $db_user . "'@'" . $pa_srvr . "'
IDENTIFIED BY '" . $db_pass . "';
$ createuser -E -P " . $db_user . "
" .