It is the first time I upload a web page to a server and I am quite inexperienced in the subject. I downloaded xampp to work in a production environment and through phpmyadmin I configured a user name, password and host = '%' But when I upload my files with Filezila, I throw this:
SQLSTATE [HY000] [1045] Access denied for 'user' @ 'localhost' (using password: YES)
I tried to connect to my server through the Mysql Shell and Workbench to create a user "user" that had all the permissions to access my database, but in both cases I threw the following:
Host xxxx.xx.xx Is not allowed to connect to this MariaDB server.
What I do not understand is why MariaDB Server? I do not have it downloaded or something.
I do not really know how I can grant the permissions to the new user inside the host so that it can access my database. My connection code is as follows:
try {
$dsn = 'mysql:host=%;dbname=db_name;charset=utf8';
$db = new PDO($dsn, 'user', 'contraseña');
$db->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
} catch (Exception $e) {
echo $e->getMessage();
exit;
}