Results 1 to 6 of 6
Thread: Ensim SQL command
-
08-23-2002, 10:46 AM #1Web Hosting Master
- Join Date
- Mar 2002
- Location
- Westbury, LI NY
- Posts
- 1,705
Ensim SQL command
When Ensim creates a site, what is the command it uses to create the SQL database and the user for it?
I could do it by hand in phpMyAdmin, but I just want to know what command it uses.
Thanks!
-
08-24-2002, 04:12 AM #2Web Hosting Evangelist
- Join Date
- Jan 2002
- Posts
- 453
create database db_name
-
08-24-2002, 09:13 AM #3Web Hosting Master
- Join Date
- Mar 2002
- Location
- Westbury, LI NY
- Posts
- 1,705
nevermind, found it.
Code:#!/bin/sh if [ $# != 3 ]; then echo "usage: `basename $0` db user password" exit 1 fi DB=$1 USER=$2 PASS=$3 mysql -u root -p <<! create database $DB; flush privileges; grant all on ${DB}.* to ${USER}@localhost identified by "${PASS}" with grant option; ! cat <<! Database $DB created User: $USER Pass: $PASS !
-
08-24-2002, 09:56 AM #4Web Hosting Evangelist
- Join Date
- Jan 2002
- Posts
- 453
yep, all thats doing is taking arguments 1,2,3 (dbname, username, and pass)
creating the database
and then assigning the permisions to that user:pass
-
08-24-2002, 10:17 AM #5Web Hosting Master
- Join Date
- Mar 2002
- Location
- Westbury, LI NY
- Posts
- 1,705
what good is a database with out permissions though?
-
08-24-2002, 11:58 AM #6Junior Guru
- Join Date
- Aug 2002
- Location
- Plymouth
- Posts
- 212
But you are using Grant command to give permissions...there are options in it to give permission settings.