MySQL server and client installation (windows)

1. Install version 5.7 on the server (zip method)

1. Download the zip file , unzip it and modify the my-default.ini file, as shown in Figure


2. Configure the mysql environment variable

3. cmd executes the command
3.1 Select the mysql bin file and execute Installation command:

3.2 Start the service:
After the installation is successful, the service must be started. Continue to enter net start mysql in cmd (as shown in the figure), and the service is started successfully!
But after mysql 5.7 version, the bin file has no data file, you need to enter the mysqld --initialize-insecure --user=mysql command, generate the data file and then start the service

3.3 Login service:
After the service is successfully started, you can log in. As shown in the figure, enter mysql -u root -p (there is no password for the first login, just press Enter), the login is successful!


4 Common mysql commands
1: Check which databases exist on the server: SHOW DATABASES
2: Create a database abccs: CREATE DATABASE abccs
3: Use the database you created: USE abccs
4: View database tables: SHOW TABLES; Empty set (0.00 sec) Indicates that there is no database table in the database just created
5: Create a database table: CREATE TABLE mytable (name VARCHAR(20), sex CHAR(1))
6: Insert data records: insert into abccs values ​​('hukejia','f ')
7: Query the records in the data table: select * from abccs
8: Other operations update, delete, etc. are all sql syntax

2.
Client installation MySQL Workbench 6.3 CE download and install the installation package directly

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326850465&siteId=291194637
Recommended