aboutsummaryrefslogtreecommitdiff
path: root/rpkid/portal-gui/scripts/rpkigui-setup-sql.py
diff options
context:
space:
mode:
authorMichael Elkins <melkins@tislabs.com>2011-12-19 19:20:24 +0000
committerMichael Elkins <melkins@tislabs.com>2011-12-19 19:20:24 +0000
commit5c9c94c67135f09aecc619887a1184b1319c6681 (patch)
treece37ba4b46c74934c93461c76946043d2d26d6f2 /rpkid/portal-gui/scripts/rpkigui-setup-sql.py
parenteaae1651c3010f318541c5e164d8b0bfde2419fd (diff)
remove sql setup script for the web portal since it is no longer needed; the gui and irdbd will share the same database, and the irdbd database is setup by $top/rpkid/rpki-sql-setup.py
svn path=/branches/tk139/; revision=4128
Diffstat (limited to 'rpkid/portal-gui/scripts/rpkigui-setup-sql.py')
-rw-r--r--rpkid/portal-gui/scripts/rpkigui-setup-sql.py29
1 files changed, 0 insertions, 29 deletions
diff --git a/rpkid/portal-gui/scripts/rpkigui-setup-sql.py b/rpkid/portal-gui/scripts/rpkigui-setup-sql.py
deleted file mode 100644
index 2d3c1833..00000000
--- a/rpkid/portal-gui/scripts/rpkigui-setup-sql.py
+++ /dev/null
@@ -1,29 +0,0 @@
-# $Id$
-#
-# This script is responsible for creating the database used by the
-# portal gui. Look in the settings.py file for the user and password.
-# n.b. The configure script generates a random password.
-#
-
-import getpass, MySQLdb
-from django.conf import settings
-
-dbname = settings.DATABASES['default']['NAME']
-dbuser = settings.DATABASES['default']['USER']
-dbpass = settings.DATABASES['default']['PASSWORD']
-
-print """WARNING!!!
-WARNING!!!
-WARNING!!!
-
-About to destroy and recreate the database named "%s" and give access
-to the user named "%s".
-""" % (dbname, dbuser)
-
-passwd = getpass.getpass('Please enter your MySQL root password: ')
-
-db = MySQLdb.connect(user='root', passwd=passwd)
-c = db.cursor()
-c.execute('DROP DATABASE IF EXISTS %s' % dbname)
-c.execute('CREATE DATABASE %s CHARACTER SET utf8' % dbname)
-c.execute('GRANT ALL ON %s.* TO %s@localhost identified by %%s' % (dbname, dbuser), (dbpass,))