MySQL Installation and operation

Source: Internet
Author: User

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

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.