I am trying to encode my connection to become UTF8. I was looking at some other posts, but soe some reason it doesnt work. No idea what I am doing wrong.
This is how my conn looks
$this->db_conn = new PDO("mysql:host=" . $this->host . ";dbname=" . $this->db_name, $this->username, $this->password);
And this is what I am trying to do, but it says that is not correct
$this->db_conn = new PDO("mysql:host=" . $this->host . ";dbname=" . $this->db_name, $this->username, $this->password.";charset=utf8");
Gives this error Database Connection Error: SQLSTATE[28000] [1045] Access denied for
I am using MySql