Directory:
1. Download
2. Configuration
3. Start the server
4. Enable the client and modify user information
Download for 1.mysql
: MySQL (official website) select "Downloads", MySQL Community Edition (MySQL community version)
2. Configuration:
Unzip the downloaded file, rename the%mysql_home%/my-default.ini to My.ini,my.ini as follows (this file can be configured in many configurations, blog MySQL storage emoji error (incorrect string Value: ' \xf0\x9f\x98\x84\xf0\x9f) is part of the solution:
[mysqld]# set MySQL base (installed) directory# @@ Basedir is the default directory for MySQL installation @ @basedir =%mysql_home%# set MySQL data directory # @@ DATADIR Store data file @ @datadir =%mysql_home%/data# Run The server on this TCP port number,3306 is the default port number, which is generally used with this port = 3306[cli ent]# MySQL Client connects to the server running on this TCP port numberport = 3306
3. Start the server
In cmd, type the content to start the MySQL server. If the start times are wrong, it's basically because the configuration file is not configured properly. Stop the server as Ctrl + C
4. Start the client:
Install MySQL server, user default root, password is empty. To do this, first make sure to start the server normally.
You can enter both the MySQL client.
Here are a few common commands:
1) Change Password
MySQL>SETfor'root'@'localhost' = password ('* * * *');
2) View all users
> SELECT User from MySQL. user;
3) Add user
MySQL>CREATEUSER'myusername' @' localhost'by'***password***';
4) authorization to the user
GRANT All on *. * to ' MyUserName '@'localhost';
5) Login client (with password)
- -P
MySQL Installation and operation