Home  >  Q&A  >  body text

Why can’t I connect to the MYSQL database?

Following the php toolbox, it shows that the database is connected, but it cannot connect to the MYSQL database.

The call displays "Execution failed, please refer to: No database selected"

自由天空自由天空1895 days ago1374

reply all(2)I'll reply

  • 王林

    王林2019-08-20 11:54:14

    Don’t forget to add database $dbname when using mysqli_connect(), or use mysqli_select_db() to select a database. Otherwise, you cannot connect to a specific database.

    reply
    0
  • ringa_lee

    ringa_lee2019-07-13 09:40:39

    No database selected, which means no database is selected, select it and then import it

    reply
    0
  • Cancelreply