Use standard mysql module functions to create db
authorAlberto Di Meglio <alberto.di.meglio@cern.ch>
Tue, 13 Sep 2005 21:04:24 +0000 (21:04 +0000)
committerAlberto Di Meglio <alberto.di.meglio@cern.ch>
Tue, 13 Sep 2005 21:04:24 +0000 (21:04 +0000)
org.glite.deployment.lb/CHANGELOG
org.glite.deployment.lb/config/scripts/glite-lb-config.py
org.glite.deployment.lb/project/version.properties

index 9a4d20d..32a02b4 100644 (file)
@@ -1,3 +1,6 @@
+DATE: 13-09-2005 23:00\r
+[dimeglio] Use standard mysql module functions to create db\r
+\r
 DATE: 08-07-2005 15:20\r
 [dimeglio] Increased major version because of interface changes in the config scripts\r
 \r
index 29b5939..2151f54 100644 (file)
@@ -6,7 +6,7 @@
 # For license conditions see the license file or http://eu-egee.org/license.html
 #
 ################################################################################
-# glite-lb-config v. 2.0.1
+# glite-lb-config v. 2.0.2
 #
 # Post-installation script for configuring the gLite Logging and Bookkeping Server
 # Robert Harakaly < robert.harakaly@cern.ch >
@@ -46,7 +46,7 @@ class glite_lb:
     def __init__(self):
         self.mysql = MySQL.Mysql()
         self.verbose = 0
-        self.version = "2.0.1"
+        self.version = "2.0.2"
         self.name = "glite-lb"
         self.friendly_name = "gLite Logging and Bookkeeping"
         params['module.version'] = self.version
@@ -281,11 +281,10 @@ python %s-config [OPTION...]""" % (self.name, os.environ['GLITE_LOCATION'], \
                 os.remove('/tmp/mysql_ct')
             
             file = open('/tmp/mysql_ct', 'w')
-            text = ['CREATE DATABASE %s;\n' % params['lb.database.name'], 
-                       'GRANT ALL PRIVILEGES ON %s.* TO %s@localhost IDENTIFIED BY "";\n' \
-                       % (params['lb.database.name'],params['lb.database.username']),
-                       'USE %s;\n' % params['lb.database.name'],
-                       '\. %s/etc/glite-lb-dbsetup.sql\n' % os.environ['GLITE_LOCATION']]
+
+            self.mysql.add_user(params['lb.database.name'],params['lb.database.username'],"",mysql_root_password)
+            text = ['USE %s;\n' % params['lb.database.name'],
+                    '\. %s/etc/glite-lb-dbsetup.sql\n' % os.environ['GLITE_LOCATION']]
     
             file.writelines(text)
             file.close()
index a7c9c63..9a0479a 100644 (file)
@@ -1,4 +1,4 @@
 
-module.version = 2.0.1
+module.version = 2.0.2
 module.age = 1
                                
\ No newline at end of file