Score:0

Cannot execute sql queries from my localhost website

gb flag
  1. I installed dual boot on a Win 10 laptop
  2. I migrated a functional mysql database and website to this machine.
  3. Queries on phpMyAdmin work fine
  4. The website works and I get connection with the usual mysqli_connect()
  5. But executing the first query from the website I get

Invalid query: SELECT id, datum, typ, belopp, kommentar FROM budget.utgifter WHERE datum>='2010-10-08' ORDER BY datum DESC

This is exactly the same query that works fine on the first machine

I have on both machines

  • Ubuntu 18.04.1 LTS
  • Apache2 2.4.41
  • PHP 7.4.3

What can possibly be wrong ?

in flag
There is an insufficient amount of data to begin guessing at the issue. Bad credentials? Typo in the DB name? Incorrect host name of the DB? Lack of permissions (for the account) in the DB? The list goes on and on …
gb flag
Thanks matigo, it was a simple question of permissions. It is solved!
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.