Nodejs+mysql development projects using the idea tool

Source: Internet
Author: User

One, the installation of MySQL server

1, the MySQL official website downloads the file package; "I am using the version: Mysql_5.7.17"

2, decompression zip compression package;

3. Install: Command line:d:\soft\mysql-5.7.17-winx64\bin> mysqld Install " Note: Open cmd as Administrator"

Add: How do I open cmd with an administrator?

Action: 1) Open the following path: C:\Windows\System32

2) Find Cmd.exe;

        

3) Click "Right Button" to open as Administrator;

4. Modify the My-default.ini file installed in the MySQL directory
Find the following two lines to change to your MySQL directory
basedir=d:\soft\mysql-5.7.17-winx64 (MySQL directory)
Datadir=d:\soft\mysql-5.7.17-winx64\data (MySQL directory \data) "key: If not, you can create a new data folder yourself"

5. Initialize: Command line: D:\soft\mysql-5.7.17-winx64\bin>mysqld--initialize-insecure

6. Starting MySQL server:d:\soft\mysql-5.7.17-winx64\bin> net start MySQL

    

Ii. deployment of the Nodejs project in the Idea Tool "focus: installation of MySQL plugins"

If the Nodejs plugin does not exist in idea, what should I do?

1. Open: Menu bar File-setting-plugins

2. Then open the first button below the rendered interface:

        

3, search "Nodejs", and download "is I have downloaded the interface"

      

(b) What if Nodejs lacks the MySQL module?

1, shortcut key ALT+F12, open Terminal input command npm install MySQL, wait for it to install MySQL module

    

2. Create a mysql.js file to access MySQL, and run this file to see the console printing information.

var mysql = require (' mysql ');

var test_database = ' test1 '; Database name of the connection
var test_table = ' info ';//Connected table name

Create a connection
var client = Mysql.createconnection ({
User: ' root ',//database name
Password: ' admin ',//Database password
});

Nodejs+mysql development projects using the idea tool

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.