~ubuntu-branches/ubuntu/trusty/mariadb-5.5/trusty-proposed

« back to all changes in this revision

Viewing changes to support-files/binary-configure.sh

  • Committer: Package Import Robot
  • Author(s): Otto Kekäläinen
  • Date: 2013-12-22 10:27:05 UTC
  • Revision ID: package-import@ubuntu.com-20131222102705-mndw7s12mz0szrcn
Tags: upstream-5.5.32
Import upstream version 5.5.32

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
SCRIPT_NAME="`basename $0`"
 
4
 
 
5
usage()
 
6
{
 
7
  echo "Usage: ${SCRIPT_NAME} [--help|-h]"
 
8
  echo ""
 
9
  echo "This script creates the MySQL system tables and starts the server."
 
10
}
 
11
 
 
12
for arg do
 
13
  case "$arg" in
 
14
    --help|-h)
 
15
      usage
 
16
      exit 0
 
17
      ;;
 
18
    *)
 
19
      echo "${SCRIPT_NAME}: unknown option $arg"
 
20
      usage
 
21
      exit 2
 
22
      ;;
 
23
  esac
 
24
done
 
25
 
 
26
if test ! -x  ./scripts/mysql_install_db
 
27
then
 
28
  echo "I didn't find the script './scripts/mysql_install_db'."
 
29
  echo "Please execute this script in the mysql distribution directory!"
 
30
  exit 1;
 
31
fi
 
32
 
 
33
echo "NOTE: This is a MySQL binary distribution. It's ready to run, you don't"
 
34
echo "need to configure it!"
 
35
echo ""
 
36
echo "To help you a bit, I am now going to create the needed MySQL databases"
 
37
echo "and start the MySQL server for you.  If you run into any trouble, please"
 
38
echo "consult the MySQL manual, that you can find in the Docs directory."
 
39
echo ""
 
40
 
 
41
./scripts/mysql_install_db --no-defaults
 
42
if [ $? = 0 ]
 
43
then
 
44
  echo "Starting the mysqld server.  You can test that it is up and running"
 
45
  echo "with the command:"
 
46
  echo "./bin/mysqladmin version"
 
47
  ./bin/mysqld_safe --no-defaults &
 
48
fi