Preface: The previous three articles set up the Django environment, but also can only write static Web pages, if you want to use the database to write dynamic Web pages, then also need the database
This chapter explains the installation and configuration of MySQL database
Text: MySQL Please log on to the MySQL official website to download the. msi file, then on the local installation, installation mode using custom customization path, after installation, use the following steps to configure MySQL (refer to Baidu Experience):
Configure the environment variables to be added in path; E:\wamp\Apache24\mysql (This is your MySQL installation path), and then modify the configuration file My-default.ini (under the MySQL installation folder directory)
Modify one of the two parameters Basedir and DataDir as follows:
Basedir = E:\wamp\Apache24\mysql
DataDir = E:\wamp\Apache24\mysql\data
E:\wamp\Apache24\ Replace with your MySQL installation path
Win+r into the cmd command, enter the MySQL installation path under the bin file (input e: Enter e-disk, then Cd:wamp\apache24\mysql\bin), enter the Mysqld-install after the service has been successfully started
Then enter net start MySQL, which will report that the server started successfully
After the service started successfully, you can log in, enter Mysql-u root-p (no password for the first login, press ENTER directly), Login success!
Finally, we recommend you to download a mysql5.1 official document to see how to operate MySQL under CMD, mainly to create a database, set up data tables, import data and other operations.
Install and configure MySQL under Windows