Install MySQL5.7.16 in Win7, win7mysql5.7.16

Source: Internet
Author: User

Install MySQL5.7.16 in Win7, win7mysql5.7.16

I have prepared a copy of MySQL5.7.16 Installation notes for your reference:

1.Create a MYSQL folder on drive C;
2, copy the mysql-5.7.16-winx64 to the C: \ MYSQL folder,Rename mysql-5.7.16;
3, in the mysql-5.7.16 directory,Create the my. ini file, The content is as follows:

[Mysql] # set the default character set of the mysql client default-character-set = utf8 [mysqld] # set port 3306 to port 3306 # set the mysql installation directory basedir = C: \ MYSQL \ mysql-5.7.16 # Set the mysql database data storage directory datadir = C: \ MYSQL \ mysql-5.7.16 \ datatmpdir = C: \ MYSQL \ mysql-5.7.16 \ data # maximum number of connections allowed max_connections = 200 # the character set used by the server defaults to the 8-bit latin1 character set character-set-server = utf8 # default storage engine default-storage-engine = INNODB

4. UseAdministrator privilege to run cmd.exe, Enter the C: \ MYSQL \ mysql-5.7.16 \ bin directory;

5. Execute the command: mysqld -- initialize-insecure -- user = mysql, under the C: \ MYSQL \ mysql-5.7.16 directory willAutomatically create the data directory;

6. Execute the command: mysqld install,Install MySQL;

7. Execute the command: net start mysql,Start MySQL;

8. Open MySQL and execute the command: mysql-uroot-p. By default, there is no password. Enter the password and press Enter;
How to set the password: mysqladmin-u root-p password
(Mysqladmin-u root-p password mysql)

9. SQL used:
-> Show databases; find the database
-> Use Database Name; Switch database directory
-> Show tables; query tables
-> Select * from table name for SQL query
-> Exit.

10. Create your own database:

Create database name; grant select, INSERT, UPDATE, DELETE, CREATE, DROP, alter on database Name. * to database name @ localhost identified by 'Password'; set password for 'database name' @ 'localhost' = OLD_PASSWORD ('Password'); create database lfhdb; grant select, INSERT, UPDATE, DELETE, CREATE, DROP, alter on lfhdb. * to lfhdb @ localhost identified by 'mysql'; -- The following execution reports the error set password for 'lfhdb' @ 'localhost' = OLD_PASSWORD ('mysql ');

11. Remote Logon Settings:

Grant all PRIVILEGES on LFHDB. * to root @ '10. 211.55.2 'identified by 'mysql ';

LFHDB. * indicates the table to which the preceding permissions are for, LFHDB indicates the database, and * indicates all the tables,
It can be inferred that the authorization for all tables in all databases is "*. *",
Authorize "database name. *" for all tables in a database and "database name. Table Name" for a table in a database ".

Root indicates the user you want to authorize. This user can be an existing user or a non-existing user.

10.211.55.2 indicates the IP address that allows remote connection. If you want to restrict the IP address, set it to "%.

Mysql is the user's password.

How to enable MySQL Remote Account-3) execute the preceding statement and then execute the following statement to take effect immediately.
> Flush privileges;

Highlights: mysql installation tutorials for different versions

The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.

Related Article

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.