File: MySQL_4.X.X-create_user_and_db.sql

package info (click to toggle)
opendb 0.81p18-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 4,716 kB
  • ctags: 6,787
  • sloc: php: 50,213; sql: 3,098; sh: 272; makefile: 54; xml: 48
file content (33 lines) | stat: -rw-r--r-- 1,029 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#
# Script to create a new OpenDB 'lender' User and 'opendb' Database
#
# Execute at Mysql 'root' user:
# 	mysql mysql -u root -p < docs/MySQL_4.X.X-create_user_and_db.sql
#
# USE THIS SCRIPT AT YOUR OWN RISK.  I WILL NOT BE HELD RESPONSIBLE
# Jason Pell - 3rd May 2003.
#

#
# Cteate a Opendb user 'lender', with password 'test'
#
INSERT INTO user (Host, User, Password) 
VALUES ('localhost', 'lender', '378b243e220ca493');

#
# Configure permissions for 'lender' user for a database 'opendb'.  Access is limited to 'localhost', so
# the database server and Apache/PHP server must be on the same server.
# 
INSERT INTO db (Host, Db, User, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Grant_priv, References_priv, Index_priv, Alter_priv, Lock_tables_priv) 
VALUES ('localhost', 'opendb', 'lender', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y');

#
# Create the 'opendb' database.
#
CREATE DATABASE opendb;

#
# Flush privileges so that the new user/db are recognised.
#
FLUSH PRIVILEGES;