mysql installation:
https://www.mysql.com/> official website
Download [DOWNLOADS] ---- [MySQL Community Server] Community Edition --- 5.6 --- No thanks, just start my download. Download only do not buy ----
- Unzip the file to the my-default.ini paste pycharm and renamed the my.ini ---- and put into the following code stickers
[mysql]
Mysql client to set the default character set
= SET-Character-default UTF8
[mysqld]
set port 3306
port = 3306Set mysql installation / decompression directory
basedir=E:\mysql\mysql-5.6.46-winx64
Set data Data storage directory database mysql
datadir=E:\mysql\mysql-5.6.46-winx64\data
To allow the maximum number of connections
max_connections=200
Character set used by the server by default 8-bit coded character set latin1
character-set-server=utf8
The default storage engine that will be used when creating a new table
default-storage-engine=INNODB
Copy the my.ini file to extract the directory of your mysql
Configuration environment variable:
Computer - System variables --path --- the E: \ mysql \ mysql-5.6.46-winx64 \ bin stickers to go
Open as administrator cmd: Search cmd-- Right - Open Identity Management
mysqld install the installation was successful --net start mysql start successfully
If you want to uninstall https://www.cnblogs.com/Demonfeatuing/p/9607230.html cmd
mysql operations:
Start the client connects to the server
mysql -uroot -p123 -h192.168.14.12
mysql> select user (); view the current logged-on user
mysql> set password = password ( '123'); set a password for the current user
Creating a user other
create user 'guest'@'192.168.14.%' identified by '123';
To a user authorization
. Grant permission type on ftp * to 'guest'@'192.168.14.%';
grant all
grant select on day37.* to 'guest'@'192.168.14.%';
grant select,insert
Database operations
View all databases show databases;
Create a database create database database name;
Switch to the name of this library use the database
How many tables show tables next to see this library;
Operating Table
Creating a table
create table student(name char(12),age int);
View table structure
desc student;
Operating data
Data Insert: insert into student values ( 'wusir', 73);
Data query: select * from student;
Modify data: update student set age = 85 where name = 'alex';
Delete data: delete from student where name = 'alex';