blob: ca6d393e3b47b7b6ce3179266d7d56d8ccbf83db (
plain)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
#!/bin/sh
# Copyright (C) 1997-2002 MySQL AB
# For a more info consult the file COPYRIGHT distributed with this file
# This scripts creates the privilege tables db, host, user, tables_priv,
# columns_priv in the mysql database, as well as the func table.
if [ x$1 = x"-bin" ]; then
shift 1
execdir=../bin
bindir=../bin
BINARY_DIST=1
fix_bin=mysql-test
scriptdir=../bin
else
execdir=../sql
bindir=../client
fix_bin=.
scriptdir=../scripts
fi
vardir=var
logdir=$vardir/log
if [ x$1 = x"-slave" ]
then
shift 1
data=var/slave-data
ldata=$fix_bin/var/slave-data
else
data=var/master-data
ldata=$fix_bin/var/master-data
fi
mdata=$data/mysql
EXTRA_ARG=""
if test ! -x $execdir/mysqld
then
echo "mysqld is missing - looked in $execdir"
exit 1
fi
# On IRIX hostname is in /usr/bsd so add this to the path
PATH=$PATH:/usr/bsd
hostname=`hostname` # Install this too in the user table
hostname="$hostname%" # Fix if not fully qualified hostname
#create the directories
[ -d $vardir ] || mkdir $vardir
[ -d $logdir ] || mkdir $logdir
# Create database directories mysql & test
if [ -d $data ] ; then rm -rf $data ; fi
mkdir $data $data/mysql $data/test
#for error messages
if [ x$BINARY_DIST = x1 ] ; then
basedir=..
else
basedir=.
EXTRA_ARG="--language=../sql/share/english/"
fi
mysqld_boot=" $execdir/mysqld --no-defaults --bootstrap --skip-grant-tables \
--basedir=$basedir --datadir=$ldata --skip-innodb --skip-bdb $EXTRA_ARG"
echo "running $mysqld_boot"
if $scriptdir/mysql_create_system_tables test $mdata $hostname | $mysqld_boot
then
exit 0
else
echo "Error executing mysqld --bootstrap"
exit 1
fi
|