Score:0

Mysql connection problem with php

tj flag

I'm trying to install a new lamp test system on ubuntu 22.04, but I'm having troubles with php 8 connecting to the mysql database.

It gives an connection denied error on all scripts I use. However the strange thing is that phpmyadmin works with the same login credentials.

The error I get: Access to database is denied for databasenameremoved: SQLSTATE[HY000] [2002] (trying to connect via (null))

This happens for multiple (all) database users. I'm sure that the username and password are correct.

Does anybody know a solution for this?

Thanks, Stijn

in flag
What is the connection string that you’re using? Is the connection using SSL or standard PDO?
Stijn avatar
tj flag
The error above is with freshrss, I do not know the string it uses. On my own scripts (that also don't work) I use mysqli_connect($databaseName.$host, $username, $password);
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.