“No database selected” error even after a db is selected

前端 未结 6 782
再見小時候
再見小時候 2021-01-19 02:02

I have selected the database but for some weird reason it still says that it is not selected.

Connection lines:

$location = \"localhost\";
$user = \"         


        
6条回答
  •  庸人自扰
    2021-01-19 02:44

    Another reason why this error pops up is because the username and password which you are using to access the database may not have appropriate read/write persmissions. Especially on a shared hosting server, you will need to assign the appropriate username to the corresponding database. I recently had this problem, I had created a new database and forgot to assign persmissions for my existing username.

提交回复
热议问题