Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupalci_environments
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupalci_environments
Commits
1038da61
Commit
1038da61
authored
1 year ago
by
dimitriskr
Committed by
Andrey Postnikov
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
MariaDB 10.3.22 - remove "create user" statement
#3399858
(cherry picked from commit
35797df4
)
parent
afc79a49
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#54556
passed
1 year ago
Stage: build
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
db/mariadb-10.3.22/Dockerfile
+4
-8
4 additions, 8 deletions
db/mariadb-10.3.22/Dockerfile
db/mariadb-10.3.22/conf/setup.sql
+0
-4
0 additions, 4 deletions
db/mariadb-10.3.22/conf/setup.sql
db/mariadb-10.3.22/conf/startup.sh
+19
-1
19 additions, 1 deletion
db/mariadb-10.3.22/conf/startup.sh
with
23 additions
and
13 deletions
db/mariadb-10.3.22/Dockerfile
+
4
−
8
View file @
1038da61
####
FROM
mariadb:10.3.22
FROM
docker.io/
mariadb:10.3.22
MAINTAINER
drupalci
# Packages..
RUN
apt-get
-y
update
&&
\
apt-get
-y
install
netcat psmisc
RUN
apt-get clean
&&
apt-get autoclean
&&
apt-get
-y
autoremove
RUN
apt-get
-y
update
||
true
;
\
apt-get
-y
install
netcat psmisc
--no-install-recommends
&&
\
rm
-rf
/var/lib/apt/lists/
*
COPY
./conf/my.cnf /etc/mysql/conf.d/drupalci.cnf
COPY
./conf/setup.sql /docker-entrypoint-initdb.d/setup.sql
RUN
rm
-rf
/var/lib/mysql/
*
USER
root
...
...
This diff is collapsed.
Click to expand it.
db/mariadb-10.3.22/conf/setup.sql
deleted
100644 → 0
+
0
−
4
View file @
afc79a49
CREATE
USER
'drupaltestbot'
@
'%'
IDENTIFIED
BY
'drupaltestbotpw'
;
GRANT
ALL
PRIVILEGES
ON
*
.
*
TO
'drupaltestbot'
@
'%'
WITH
GRANT
OPTION
;
SELECT
User
FROM
mysql
.
user
;
FLUSH
PRIVILEGES
;
This diff is collapsed.
Click to expand it.
db/mariadb-10.3.22/conf/startup.sh
+
19
−
1
View file @
1038da61
#!/bin/bash
MYSQL_ALLOW_EMPTY_PASSWORD
=
yes
/usr/local/bin/docker-entrypoint.sh mysqld
if
[
!
-f
/var/lib/mysql/ibdata1
]
;
then
echo
"rebuilding /var/lib/mysql/ibdata1"
mysql_install_db
--user
=
mysql
--basedir
=
/usr/
--datadir
=
/var/lib/mysql/
test
-e
/var/run/mysqld
||
install
-m
755
-o
mysql
-g
root
-d
/var/run/mysqld
/usr/bin/mysqld_safe &
PID
=
"
${
!
}
"
sleep
5s
while
!
netcat
-vz
localhost 3306
;
do
sleep
1
;
done
mysql
-e
"CREATE USER 'drupaltestbot'@'%' IDENTIFIED BY 'drupaltestbotpw';"
mysql
-e
"GRANT ALL PRIVILEGES ON *.* TO 'drupaltestbot'@'%' WITH GRANT OPTION; SELECT User FROM mysql.user; FLUSH PRIVILEGES;"
echo
"Grants added"
killall mysqld
wait
${
PID
}
fi
/usr/bin/mysqld_safe
;
echo
"mysql died at
$(
date
)
"
;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment