source: trunk/gsdl3/dist-resources/mysql-setup.sh@ 7846

Last change on this file since 7846 was 7846, checked in by kjdon, 20 years ago

added a force option so that it will continue even if it can't use hostname and resolveip

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 813 bytes
Line 
1#!/bin/sh
2
3gsdl3home=$1
4
5if [ "$gsdl3home" == "" ]; then
6 echo "Usage: $0 <gsdl3home>"
7 exit 1
8fi
9
10cd $gsdl3home
11
12# set up the sql db
13user=`whoami`
14pushd $gsdl3home/packages/mysql
15echo "installing mysql databases"
16./bin/mysql_install_db --datadir=$gsdl3home/packages/mysql/var --basedir=$gsdl3home/packages/mysql --user=$user --force
17echo "setting up the user priviledges"
18./bin/mysqld_safe --datadir=$gsdl3home/packages/mysql/var --basedir=$gsdl3home/packages/mysql --pid_file=$gsdl3home/packages/mysql/var/gsdl3.pid --err-log=$gsdl3home/packages/mysql/var/gsdl3.err &
19sleep 2
20./bin/mysql --user=root --execute="GRANT SELECT,INSERT,DELETE,UPDATE,DROP,CREATE ON *.* TO gsdl3admin@localhost;"
21./bin/mysql --user=root --execute="GRANT SELECT ON *.* TO gsdl3reader@localhost;"
22
23popd
24./gs3-mysql-server.sh stop
Note: See TracBrowser for help on using the repository browser.