Skip to content

Commit e85508c

Browse files
committed
rename mysql_init.sql to init.sql
1 parent 49dfb4b commit e85508c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,10 @@ Optionally, you can provide a SQL script which will run immediately after MySQL
130130

131131
Please note that **the SQL initialization script runs only at the container first startup**. The script won't run if MySQL has already been configured (i.e. if the `/var/lib/mysql` contains initialized MySQL data).
132132

133-
The below command will run the docker image `mattrayner/lamp:latest` interactively, exposing port `80` on the host machine with port `80` on the docker container. It will also create a volume linking the `script.sql` file within your current folder to the `/db/mysql_init.sql` file on the container. This is where the container expects the SQL initialization script to live.
133+
The below command will run the docker image `mattrayner/lamp:latest` interactively, exposing port `80` on the host machine with port `80` on the docker container. It will also create a volume linking the `script.sql` file within your current folder to the `/db/init.sql` file on the container. This is where the container expects the SQL initialization script to live.
134134

135135
```bash
136-
docker run -i -t -p "80:80" -v ${PWD}/script.sql:/db/mysql_init.sql:ro mattrayner/lamp:latest
136+
docker run -i -t -p "80:80" -v ${PWD}/script.sql:/db/init.sql:ro mattrayner/lamp:latest
137137
```
138138

139139
## Adding your own content

supporting_files/mysql_init.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ if [ "$CREATE_MYSQL_USER" = true ]; then
3939
mysql -uroot -e "GRANT ALL PRIVILEGES ON ${_userdb}.* TO '${_user}'@'%'"
4040
fi
4141

42-
if [[ -e /db/mysql_init.sql ]]; then
42+
if [[ -e /db/init.sql ]]; then
4343
echo "=> Initializing the database"
4444

45-
mysql -uroot < /db/mysql_init.sql
45+
mysql -uroot < /db/init.sql
4646
fi
4747

4848
echo "=> Done!"

0 commit comments

Comments
 (0)