Home > Article > Backend Development > How to configure the database in thinkphp5?
First find the configuration file, in application->config.php. (Recommended learning: PHP video tutorial)
After finding the configuration file, open the configuration file.
Set namespace and debug mode.
Set the type of database.
Set the host address. If you are developing locally, write 127.0.0.1
Set the name of the database, which is which database you want to use.
The next step is to set the username and password for the database.
The above is the detailed content of How to configure the database in thinkphp5?. For more information, please follow other related articles on the PHP Chinese website!