Mysql---deployment, creating users

Source: Internet
Author: User

Version: Mysql-5.7.18-win32

Steps:

1 Preparing the My.ini file to be placed in the bin sibling directory

My.ini files can be set bsedir/datadir/port and so on

2 Initializing the database (version 5.7 requires the database to be initialized before the data folder is generated)

Go to Bin directory, execute cmd

The default configuration file (My.ini) is the My.ini file that is sibling to the bin directory, or you can specify the configuration file yourself

3 start the MySQL server (a one-time service that starts with CMD, CMD shuts down, and the server shuts down, not the MySQL service that initiates the persistence)

Go to the bin directory and execute

The end is similar to the feeling that can never be done

At this point, you open the MySQL database configured according to your My.ini file (for example: Your port is set to 3355)

4 log in to MySQL server

Log in to the MySQL database you just opened according to your My.ini file

  

-P port number-p password

The password for initializing the database is generated randomly, under your Data folder

5 Change the initial password (must), set up the user

Change Password:

To create a user:

mysql> ALTER USER ' root ' @' localhost ' identified by 'new_password ';

Format: Grant permissions on the database tutorial name. table name to user @ Login host identified by "User password";

After the @ is the client IP address (or hostname) that accesses MySQL is represented by any client, if you fill out localhost as
Local access (the MySQL database cannot be accessed remotely by this user).

Mysql---deployment, creating users

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.