Erreur connexion MySQL, quell port ?

Installation & Configuration du logiciel
Répondre
flora
Gsup LEVEL 0
Messages : 1
Enregistré le : dim. 1 mars 2020 16:40

Bonjour,
J'ai lu le sujet avec le meme nom que vous avez donner le bon repons, s'il vous plait aidez moi aussi.
L'erreur est : Connection failed: SQLSTATE[HY000] [1049] Unknown database 'mabase'.

J'ai wampserver3 on Win 10. Il marche, mais pas avec mysql. Je voudrais travailler avec PDO:
//-------------------------------------------------------------------------------------------------------------
$server = "localhost";
$user = "root";
$pass = "";
$dbname="mabase";

$dsn="mysql:host=$server;dbname=$dbname";
try {
$connect = new PDO($dsn, $user, $pass);
$connect->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$connect -> exec("SET character_set_connection = 'utf8'");
$connect -> exec("SET NAMES 'UTF8'");
}
catch(PDOException $error)
{
echo "Connection failed: " . $error->getMessage();
}
//-------------------------------------------------------------------------------------------------------------

J'ai essaye de mettre des divers port pour mysql, mais je cois que j'ai une plus grosse pb.
Voila mes tests pour le port:
Je suis inquiete pour le message `N/A means that there are no service related to PID ...`
//-------------------------------------------------------------------------------------------------------------
***** Test which uses port 3307 *****

===== Tested by command netstat filtered on port 3307 =====


Test for TCP
Your port 3307 is used by a processus with PID = 8788
The processus of PID 8788 is 'mysqld.exe' Session: Services
The service of PID 8788 for 'mysqld.exe' is 'N/A'
N/A means that there are no service related to PID 8788
Processus 'mysqld.exe' is launched by service 'wampmysqld64' with PID 468

Test for TCPv6
Your port 3307 is used by a processus with PID = 8788
The processus of PID 8788 is 'mysqld.exe' Session: Services
The service of PID 8788 for 'mysqld.exe' is 'N/A'
N/A means that there are no service related to PID 8788
Processus 'mysqld.exe' is launched by service 'wampmysqld64' with PID 468

--- Do you want to copy the results into Clipboard?
--- Type 'y' to confirm - Press ENTER to continue...
//-------------------------------------------------------------------------------------------------------------
***** Test which uses port 3302 *****

===== Tested by command netstat filtered on port 3302 =====


Test for TCP
Your port 3302 is used by a processus with PID = 3364
The processus of PID 3364 is 'mysqld.exe' Session: Services
The service of PID 3364 for 'mysqld.exe' is 'N/A'
N/A means that there are no service related to PID 3364
Processus 'mysqld.exe' is launched by service 'wampmysqld64' with PID 2840

Test for TCPv6
Your port 3302 is used by a processus with PID = 3364
The processus of PID 3364 is 'mysqld.exe' Session: Services
The service of PID 3364 for 'mysqld.exe' is 'N/A'
N/A means that there are no service related to PID 3364
Processus 'mysqld.exe' is launched by service 'wampmysqld64' with PID 2840

--- Do you want to copy the results into Clipboard?
--- Type 'y' to confirm - Press ENTER to continue...
//-------------------------------------------------------------------------------------------------------------
...les memes pour d'autres valeurs.

S'il vous plait aidez moi,
Merci,
Flora
Avatar du membre
Flox
Administrateur du site
Messages : 9436
Enregistré le : jeu. 21 juin 2012 19:00

Bonjour,

Pouvez vous vous connectez a phpmyadmin et faire un impression écran de la page d'accueil.

Cdt
GestSup: 3.2.47 | Debian: 12 | Apache: 2.4.59 | MariaDB: 11.5.2 | PHP: 8.3.12 | https://doc.gestsup.fr/
Répondre