1. Install mysql
Install mysql-installer-community-8.0.11.0.msi for Mysql by default. You can download the mysql-installer-community-8.0.11.0.msi for Mysql by default.
2. Verify that mysql is successfully installed
Go to C: Program Files\MySQL\MySQL Server 8.0\bin, open CMD window, and enter the following command to verify whether the connection is successful:
If the database table can be connected, the local mysql database is installed successfully. How to connect to mysql?
Node. js connects to mysql
NPM install mysql for node.js
Once installed, connect as follows:
However, there will be an error! Client does not support authentication protocol requested by server; Consider upgrading MySQL client!!
4. Resolve the error that the Client does not support Authentication Protocol
Enter the above command to solve the pull, 123456 is the password to connect to the database; Re-run the 3 program does not report error, the running result is correct!
Next, you can connect to the database and read the data from the database table. Here you can paste the code to run the test yourself:
Connect to the database, the following development can continue to pull ~~