Home  >  Article  >  Backend Development  >  How to configure the database in thinkphp5?

How to configure the database in thinkphp5?

(*-*)浩
(*-*)浩Original
2019-09-04 14:28:153153browse

How to configure the database in thinkphp5?

First find the configuration file, in application->config.php. (Recommended learning: PHP video tutorial)

How to configure the database in thinkphp5?After finding the configuration file, open the configuration file.

How to configure the database in thinkphp5?Set namespace and debug mode.

How to configure the database in thinkphp5?Set the type of database.

How to configure the database in thinkphp5?Set the host address. If you are developing locally, write 127.0.0.1

How to configure the database in thinkphp5?

Set the name of the database, which is which database you want to use.

How to configure the database in thinkphp5?

The next step is to set the username and password for the database.

How to configure the database in thinkphp5?

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn