Blame view

CONNECT_TO_MYSQL_AS_ROOT 1.08 KB
d84529c1   Etienne Pallier   ajout scripts con...
1
2
#!/usr/bin/env bash

2f2cd340   Etienne Pallier   amelioration test...
3
# Si docker et execution directe (hors conteneur) depuis le repertoire data/ (bind du repertoire docker)
4365cfbd   Etienne Pallier   amelioration scri...
4
# => on rappelle ce meme script avec le CLI docker puis on exit
2f2cd340   Etienne Pallier   amelioration test...
5
6
7
[ -f ../docker-compose.yml ] && (docker exec -it labinvent $0 $* ; true) && exit
#[ -f ../docker-compose.yml ] && docker exec -it labinvent $0
#[ -f ../docker-compose.yml ] && exit
4365cfbd   Etienne Pallier   amelioration scri...
8
# Execution SANS docker, ou bien AVEC docker depuis le conteneur
7aa0dc74   Etienne Pallier   bugfix pour exec ...
9
echo "IN $(pwd)"
4365cfbd   Etienne Pallier   amelioration scri...
10
11
12
13
14
15
16
17






# Si fichier install/ENV.sh existe, alors mode SANS docker
[ -f install/ENV.sh ] && source install/ENV.sh
d84529c1   Etienne Pallier   ajout scripts con...
18
19


d84529c1   Etienne Pallier   ajout scripts con...
20
#echo $MYSQL_ROOT_LOGIN
4365cfbd   Etienne Pallier   amelioration scri...
21
#echo "pass  is:" $MYSQL_ROOT_PASSWORD
d84529c1   Etienne Pallier   ajout scripts con...
22
23
24
25
26

#echo $MYSQL_PORT #127.0.0.1:3307
#MYSQL_PORT=$(echo "$MYSQL_PORT" | cut -d':' -f 2)
#echo $MYSQL_PORT #3307

4365cfbd   Etienne Pallier   amelioration scri...
27
28
mysql -h $MYSQL_HOST -u $MYSQL_ROOT_LOGIN --password="$MYSQL_ROOT_PASSWORD"
#mysql -h 127.0.0.1 -u $MYSQL_ROOT_LOGIN --password="$MYSQL_ROOT_PASSWORD"
6694b167   Etienne Pallier   update scripts CO...
29
#mysql -h 127.0.0.1 -u $MYSQL_ROOT_LOGIN -p$MYSQL_ROOT_PASSWORD
d84529c1   Etienne Pallier   ajout scripts con...
30
31
#mysql -h 127.0.0.1 -u $MYSQL_USER -P $MYSQL_PORT --protocol=tcp -p$MYSQL_PASSWORD
#mysql -h 127.0.0.1 -u $MYSQL_USER -P $MYSQL_PORT -p$MYSQL_PASSWORD