How to install the database of DreamWeaver CMS: 1. Use the command "mysql -u root -p" to log in to the MySQL database; 2. Create a new database to store your DreamWeaver CMS data; 3. Create a new database user to manage the database just created; 4. Change the content of the "config.php" configuration file to the database and user information created in the previous steps.
The operating system of this tutorial: Windows 10 system, DedeCMS version 5.7.109, Dell G3 computer.
DreamWeaver CMS is a website construction management system developed using PHP language, so a database needs to be installed during the installation process to store website content and data.
The following is the detailed operation method for installing the database of Dreamweaver CMS:
1. Log in to the MySQL database
Before installing Dreamweaver CMS, you need to prepare a server. And the MySQL database is installed. The command to log in to the MySQL database is as follows:
mysql -u root -p
Among them, "root" represents the MySQL database administrator account, and the "-p" option represents entering the password. When you press the Enter key, you will be prompted to enter the password.
2. Create a database
Create a new database to store your DreamWeaver CMS data. If you want to name the database "dedecms", you can execute the following SQL command:
create database dedecms default character set utf8;
where "dedecms" is your database name, and "utf8" is the database default character set.
3. Create a database user
Create a new database user to manage the database just created. If you want to set the username to "dedecmsuser" and the password to "password", you can execute the following SQL command:
grant all privileges on dedecms.* to dedecmsuser@localhost identified by 'password';
Among them, "dedecms" is your database name, and "dedecmsuser" is the database name you want. Created database user name, "localhost" means that the user can only connect to the database locally. In this way, you have successfully created a new database and user.
4. Change the configuration file
There is a "config.php" file in the DreamWeaver CMS installation package, which contains information about connecting to the database. You need to edit the file and change the following information:
// 数据库主机名 $db_host = "localhost"; // 数据库用户名 $db_user = "dedecmsuser"; // 数据库密码 $db_pass = "password"; // 数据库名称 $db_name = "dedecms";
Just modify the above content to the database and user information you created in the previous steps.
The above is the detailed content of How to install the database in Dreamweaver CMS. For more information, please follow other related articles on the PHP Chinese website!