Home >PHP Framework >ThinkPHP >How to configure the database in thinkphp5
First find the configuration file, in application->config.php.
After finding the configuration file, open the configuration file.
Related recommendations: "ThinkPHP Tutorial"
Set the namespace and debugging 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!