skip to Main Content

I have a question which is indeed asked frequently.. but all the answers that were marked solved did nothing any good. thats why i have a question.

since yesterday i want to connect via PHP to a phpmyadmin database. I have no problems when the php project is inside the web folder. but since this project is outside currently it’s not working.

this is what i use to make a connection to the phpmyadmin database.

return [
    'dbname' => 'dbname',
    'host' => 'link_of_synology_nas.synology.me',
    'user' => 'the_user',
    'password' => 'the  password',
    'port' => 3306
];

i always get a error that is called:

Fatal error: Uncaught PDOException: SQLSTATE[HY000] [1045] Access denied for user 'user'@'localhost'

enter image description here

i have dove into the phpmyadmin config and edit there some entries.. but even the internet did not help. im not really into heavy networking. so if there is anyone who could help me for fixing this issue. would be appriciated.

Kind regards,

Beau den Heijer

2

Answers


  1. You are referencing like the "client" is localhost but i think this connection is executed by the client or somewhere else

    Login or Signup to reply.
  2. On Synology, install phpMyAdmin through Package Center and log in to phpMyAdmin. From there, go to "Gebruikersaccounts" and create a new account for external usage. Make sure you set "Servernaam" to "Elke host" and "Authenticatie Plugin" to "MySQL authenticatie". Also grant access to the database schema.

    Now you should be able to use the newly created account to connect from external SQL clients.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search