MISE A JOUR
This commit is contained in:
@@ -14,6 +14,6 @@ CREATE TABLE IF NOT EXISTS `articles` (
|
||||
`date_creation` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
-- Admin par défaut (mot de passe : admin123)
|
||||
|
||||
INSERT INTO `utilisateur` (`login`, `password`) VALUES
|
||||
('admin', '$2y$10$wXQTzJxAJdiVV5C.fC00GO8lGpAIAo3b5hzXC7ANpFOQeIaQvoBj.');
|
||||
@@ -12,7 +12,7 @@ services:
|
||||
MYSQL_PASSWORD: cmspassword
|
||||
volumes:
|
||||
- db_data:/var/lib/mysql
|
||||
- ./sql:/docker-entrypoint-initdb.d:ro # exécutera les .sql à l'initialisation
|
||||
- ./sql:/docker-entrypoint-initdb.d:ro
|
||||
ports:
|
||||
- "3306:3306"
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
// Connexion PDO à la base MySQL (depuis PHP exécuté sur ta machine)
|
||||
|
||||
$host = '127.0.0.1'; // ou 'localhost'
|
||||
$host = '127.0.0.1';
|
||||
$port = 3306;
|
||||
$db = 'cms';
|
||||
$user = 'cmsuser';
|
||||
@@ -17,7 +16,7 @@ $options = [
|
||||
|
||||
try {
|
||||
$pdo = new PDO($dsn, $user, $pass, $options);
|
||||
// echo "Connexion réussie !"; // tu peux tester si tu veux
|
||||
|
||||
} catch (PDOException $e) {
|
||||
die("Erreur de connexion : " . $e->getMessage());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user