I am trying to figure out the right way to do 'this':

Create scripts that does MySql adminy things, post/submit the script to the 
dabo 
repository so that others can run it.  The scripts will help test and diagnose 
things, like "do BIT fields work?" (which they currently don't.)

What I don't want:
A) have to edit out/in my passwords before/after each commit.
B) create a vulnerability on someone's system who just grabs it and runs it.

I think this can all be done with the use of ~/.my.cnf, but I am not quite sure 
how to deal with multiple users.

I am sure this is a previously solved problem, so if anyone knows where the 
solution is, point me to it.

here is some useful reading:

http://dev.mysql.com/doc/refman/5.0/en/password-security.html
http://dev.mysql.com/doc/refman/5.0/en/option-files.html

Here is my current attempt: (with pw's fixed  duh.)

# mkdb.sh
# makes a database on MySql
# it requires the daboadmin user be setup using the following command:
# mysql -u root --execute "create user daboadmin; grant ALL PRIVILEGES on *.* 
to 
#   daboadmin identified by 'foo0' with grant option;"

mysql -u daboadmin <<EOF
DROP DATABASE IF EXISTS dabotest1;
CREATE DATABASE dabotest1;
GRANT ALL
         ON dabotest1.*
         TO dabouser
         IDENTIFIED BY 'foo1';

use dabotest1;
create table table1 (
         kTable1_pk      int     auto_increment  primary key,
         bFid1 bit ) ;
EOF

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Reply via email to