i wonder if there is another way to access my SQL database, without a clear text password. Here is my php code:
const MYSQL_HOST = 'localhost';
const MYSQL_PORT = 3306;
const MYSQL_NAME = 'namebd';
const MYSQL_USER = 'admin';
const MYSQL_PASSWORD = 'myadminpass6128445$';
try {
$mysqlClient = new PDO(
sprintf('mysql:host=%s;dbname=%s;port=%s', MYSQL_HOST, MYSQL_NAME, MYSQL_PORT),
MYSQL_USER,
MYSQL_PASSWORD
);
$mysqlClient->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch(Exception $exception) {
die('Erreur : '.$exception->getMessage());
}
Another question: even with password type, i can see my users password in clear text. is there is a way that noone can see the passwords?