Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
0aec2db7
Commit
0aec2db7
authored
Feb 12, 2014
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:Tokutek/ft-engine
parents
b36c75d9
da8440a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
scripts/setup.mysql.bash
scripts/setup.mysql.bash
+11
-8
No files found.
scripts/setup.mysql.bash
View file @
0aec2db7
...
...
@@ -13,6 +13,7 @@ s3bucket=tokutek-mysql-build
sleeptime
=
60
builtins
=
"mysqlbuild shutdown install startup s3bucket sleeptime"
mysqld_args
=
"--user=mysql --core-file --core-file-size=unlimited"
sudo
=
/usr/bin/sudo
defaultsfile
=
""
if
[
-f
/etc/
$(
whoami
)
.my.cnf
]
;
then
defaultsfile
=
/etc/
$(
whoami
)
.my.cnf
...
...
@@ -92,13 +93,13 @@ fi
# set ldpath
ldpath
=
""
if
[
-d
/usr/local/gcc-4.7/lib64
]
;
then
ldpath
=
"export LD_LIBRARY_PATH=/usr/local/gcc-4.7/lib64:
\$
LD_LIBRARY_PATH;"
echo
skip
ldpath
=
"export LD_LIBRARY_PATH=/usr/local/gcc-4.7/lib64:
\$
LD_LIBRARY_PATH;"
fi
# shutdown mysql
if
[
$shutdown
-ne
0
]
;
then
if
[
-x
/etc/init.d/mysql
]
;
then
sudo
setsid /etc/init.d/mysql stop
$
sudo
setsid /etc/init.d/mysql stop
else
/usr/local/mysql/bin/mysqladmin shutdown
fi
...
...
@@ -123,7 +124,7 @@ fi
if
[
!
-d
$mysqlbuild
]
||
[
$install
-ne
0
]
;
then
rm
mysql
if
[
-d
$mysqlbuild
]
;
then
sudo rm
-rf
$mysqlbuild
;
fi
if
[
-d
$mysqlbuild
]
;
then
$
sudo
rm
-rf
$mysqlbuild
;
fi
tar
-x
$compression
-f
$basedir
/
$mysqltarball
if
[
$?
-ne
0
]
;
then
exit
1
;
fi
...
...
@@ -137,8 +138,8 @@ if [ ! -d $mysqlbuild ] || [ $install -ne 0 ] ; then
installdb
=
$mysqlbuild
/scripts/mysql_install_db
fi
sudo chown
-R
mysql
$mysqlbuild
/data
sudo chgrp
-R
mysql
$mysqlbuild
/data
$
sudo
chown
-R
mysql
$mysqlbuild
/data
$
sudo
chgrp
-R
mysql
$mysqlbuild
/data
# 5.6 debug build needs this
if
[
!
-f
$mysqlbuild
/bin/mysqld
]
&&
[
-f
$mysqlbuild
/bin/mysqld-debug
]
;
then
...
...
@@ -150,12 +151,14 @@ if [ ! -d $mysqlbuild ] || [ $install -ne 0 ] ; then
else
default_arg
=
"--defaults-file=
$defaultsfile
"
fi
sudo
bash
-c
"
$ldpath
$installdb
$default_arg
--user=mysql --basedir=
$PWD
/
$mysqlbuild
--datadir=
$PWD
/
$mysqlbuild
/data"
$
sudo
bash
-c
"
$ldpath
$installdb
$default_arg
--user=mysql --basedir=
$PWD
/
$mysqlbuild
--datadir=
$PWD
/
$mysqlbuild
/data"
if
[
$?
-ne
0
]
;
then
exit
1
;
fi
else
# create link
rm
/usr/local/mysql
ln
-s
$mysqldir
/usr/local/mysql
if
[
$?
-ne
0
]
;
then
exit
1
;
fi
rm
/usr/local/
$mysqlbuild
ln
-s
$mysqldir
/usr/local/
$mysqlbuild
if
[
$?
-ne
0
]
;
then
exit
1
;
fi
fi
...
...
@@ -170,14 +173,14 @@ if [ $startup -ne 0 ] ; then
echo ulimit
-n
10240 exitcode
$exitcode
if
[
-x
/etc/init.d/mysql
]
;
then
sudo
setsid /etc/init.d/mysql start
$
sudo
setsid /etc/init.d/mysql start
else
if
[
-z
"
$defaultsfile
"
]
;
then
default_arg
=
""
else
default_arg
=
"--defaults-file=
$defaultsfile
"
fi
sudo
-b
bash
-c
"
$ldpath
/usr/local/mysql/bin/mysqld_safe
$default_arg
$mysqld_args
"
>
/dev/null 2>&1 &
$
sudo
-b
bash
-c
"
$ldpath
/usr/local/mysql/bin/mysqld_safe
$default_arg
$mysqld_args
"
>
/dev/null 2>&1 &
fi
sleep
$sleeptime
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment