Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qg-dockerfiles
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QA
qg-dockerfiles
Commits
cd4498a0
Commit
cd4498a0
authored
Oct 20, 2017
by
daidekun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
db0a54e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
3 deletions
+30
-3
docker-entrypoint.sh
baseimg/mysql5_6/docker-entrypoint.sh
+30
-3
No files found.
baseimg/mysql5_6/docker-entrypoint.sh
View file @
cd4498a0
#!/bin/sh
public_ip
=
"www.q-gp.com"
sql_file_folder
=
./sql_to_run
set
-e
set
-x
# Start the MySQL daemon in the background.
/usr/sbin/mysqld &
mysql_pid
=
$!
until
mysqladmin ping &>/dev/null
;
do
echo
-n
"."
;
sleep
0.2
done
# Permit root login without password from outside container.
mysql
-e
"GRANT ALL ON *.* TO qa@'%' IDENTIFIED BY 'qatest' WITH GRANT OPTION"
echo
"cd
$sql_file_folder
"
cd
$sql_file_folder
for
entry
in
./
*
do
echo
"run sql file:
$entry
"
mysql <
$entry
done
# Tell the MySQL daemon to shutdown.
mysqladmin shutdown
# Wait for the MySQL daemon to exit.
wait
$mysql_pid
sh /etc/init.d/mysql start
sh ./db_execute_sql.sh
sh /etc/init.d/mysql restart
\ No newline at end of file
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