Spaces:
Build error
Build error
Demosthene-OR
commited on
Commit
•
824507f
1
Parent(s):
3c130d0
....
Browse files- Dockerfile +3 -2
- README.md +1 -2
- mysql_connector_python.py +1 -1
Dockerfile
CHANGED
@@ -20,7 +20,8 @@ EXPOSE 3306
|
|
20 |
COPY --chown=user ./script.sql /docker-entrypoint-initdb.d/
|
21 |
|
22 |
# Modifier le fichier de configuration pour autoriser les connexions distantes
|
23 |
-
RUN sed -i 's/127.0.0.1/0.0.0.0/g' /etc/mysql/my.cnf
|
|
|
24 |
|
25 |
# Démarrer le serveur MySQL
|
26 |
-
CMD ["mysqld",
|
|
|
20 |
COPY --chown=user ./script.sql /docker-entrypoint-initdb.d/
|
21 |
|
22 |
# Modifier le fichier de configuration pour autoriser les connexions distantes
|
23 |
+
# RUN sed -i 's/127.0.0.1/0.0.0.0/g' /etc/mysql/my.cnf
|
24 |
+
# RUN mysqld --verbose --help
|
25 |
|
26 |
# Démarrer le serveur MySQL
|
27 |
+
CMD ["mysqld","--bind-address","0.0.0.0","--port","7860"]
|
README.md
CHANGED
@@ -5,7 +5,6 @@ colorFrom: yellow
|
|
5 |
colorTo: blue
|
6 |
sdk: docker
|
7 |
pinned: false
|
8 |
-
app_port: 3306
|
9 |
---
|
10 |
-
|
11 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
5 |
colorTo: blue
|
6 |
sdk: docker
|
7 |
pinned: false
|
|
|
8 |
---
|
9 |
+
app_port: 3306
|
10 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
mysql_connector_python.py
CHANGED
@@ -7,7 +7,7 @@ client_flags = [mysql.connector.ClientFlag.PROTOCOL_41, mysql.connector.ClientFl
|
|
7 |
conn = mysql.connector.connect(
|
8 |
host= "demosthene-or-rakuten-mysql.hf.space", # "localhost", #"demosthene-or-rakuten-mysql.hf.space", # Adresse IP ou nom d'hôte du serveur MySQL
|
9 |
user= 'root', # Nom d'utilisateur MySQL
|
10 |
-
port="
|
11 |
password= "Rakuten", # "Rakuten", # Mot de passe MySQL
|
12 |
database="rakuten_db", # Nom de la base de données
|
13 |
client_flags=client_flags # Spécifier le protocole TCP
|
|
|
7 |
conn = mysql.connector.connect(
|
8 |
host= "demosthene-or-rakuten-mysql.hf.space", # "localhost", #"demosthene-or-rakuten-mysql.hf.space", # Adresse IP ou nom d'hôte du serveur MySQL
|
9 |
user= 'root', # Nom d'utilisateur MySQL
|
10 |
+
port="7860",
|
11 |
password= "Rakuten", # "Rakuten", # Mot de passe MySQL
|
12 |
database="rakuten_db", # Nom de la base de données
|
13 |
client_flags=client_flags # Spécifier le protocole TCP
|