First: Installation of MySQL
Download MySQL software, after modifying the installation path
Installing the Database MySQL5.7.18
The first step: Database MySQL5.7.18 can download the corresponding version on the official website,: http://www.filehorse.com/download-mysql-64/,
Step two: Unzip the downloaded installation package to a disk,
Step Three: Configure the environment variable, create a new environment variable mysql_home, enter the MySQL installation directory,
Then insert the%mysql_home%\bin into the last face of the path;
Fourth step: Run the command line as an administrator, press Win+r to enter CMD, and click the right mouse button to run as Administrator.
Fifth step: Switch to the MySQL installation directory and install it using mysqld:
Initialize data: mysqld--initialize-insecure--user=mysql,
Start service: Mysqld--user=mysql,
Initialize the MySQL root password mysqladmin-u root password ' new-password ',
See https://dev.mysql.com/doc/refman/5.7/en/data-directory-initialization-mysqld.html for details .
Sixth step: Register Service mysqld--install MySQL
Start the service with the net start MySQL command.
Enter the Mysql-u root-p command: And then fill in the fifth step of the password that you entered when initializing the database, as shown in:
Enter show databases under the MySQL command; , look at the tables in the database, as shown in:
This indicates that the database has been successfully installed.
Second: Database Special query statements
In descending order, select name from Data order by name Desc; ----Here desc is in descending order of meaning
The relative column position of the query, select name, price from the data order by 2,3;-----here 2,3 means to sort by the second column first, and then sort by the third column.
Note: You must specify each column with DESC when you want to sort in descending order on more than one column.
Third:
Navicat database software new link, and the difference between a new database
New link creates a data link object that contains a database
To create a data link, create a database
Select the type of database link you created. My is MySQL, set the link name, the password port number.
E-MySQL CREATE database
This will create the database.
Special commands in MySQL database queries