Download and installation of MySQL free installation version

Source: Internet
Author: User
Tags mysql free mysql command line

Download

Open: https://www.mysql.com/downloads/

1. Click on the entry:,

2. Click after entering:

3. To the Real download page, select the platform, select the version (install version and install free version), download

4, I now download the free install version of "Windows (x86, 64-bit), ZIP Archive"

Installation Services

1. Download MySQL

2. Unzip the MySQL archive package
Unzip the downloaded MySQL package into a custom directory, and my unzip directory is:
"D:\java\mysql"
Will unzip the directory under the default file My-default.ini copy one copy, renamed My.ini
Copy the following configuration information to My.ini save
#如果没有my-default.ini, you can create your own My.ini
#########################################################
[Client]
port=3306
Default-character-set=utf8
[Mysqld]
port=3306
Character_set_server=utf8
#安装路径
Basedir=d:\java\mysql
#数据路径
Datadir=d:\java\mysql\data
Sql_mode=no_engine_substitution,strict_trans_tables
[Winmysqladmin]
D:\java\mysql\bin\mysqld.exe
#########################################################

3. Add an environment variable (optional)

The operation is as follows:
1) Right-click My Computer, properties, advanced system settings (advanced), environment variables
Click the New button under System variables
Input variable name: mysql_home
Input variable Value: D:\java\mysql
#即为mysql的自定义解压目录.
2) Select path in the system variable
Click the Edit button
To add a variable value to a variable value:%mysql_home%\bin
Note that this variable is added after the value of the original variable, separated from it, and cannot delete the original variable value.

4. Registering MySQL as a Windows system service

1) from the console into the bin directory under the MySQL decompression directory:
2) Enter the Service installation command:
Mysqld Install MySQL--defaults-file= "D:\java\mysql\my.ini"
#解压目录下修改的my. ini file
A successful installation will prompt the service to install successfully.
#注: The My.ini file is placed in the root directory after MySQL decompression
#移除服务命令为: Mysqld Remove

5. Start the MySQL service

Method One:
The Start service command is: net start MySQL
Method Two:
Open the Administration Tools service and locate the MySQL service.
Start the service by right-clicking to start or by tapping on the left-hand boot directly.

If there is an error here: Stop after the MySQL service on the local computer starts. Some services will stop automatically if they are not used by another service or program

Solution: First enter the initialization command to execute mysqld--initialize-insecure--user=mysql

And then install the service,

6. Change the password of the root account

The default password for the root account is empty when the installation is complete, and you can modify the password to the specified password. Example: 123456
C:>mysql–uroot
Mysql>show databases;
Mysql>use MySQL;
Mysql>update user SET Password=password ("123456") WHERE user= ' root ';
Mysql>flush privileges;
Mysql>quit

Newly installed MySQL5.7, enter update user SET Password=password ("123456") WHERE user= ' root '; prompt error 1054 (42S22): Unknown column ' Pass Word ' in ' field list, originally the MySQL database has no password This field, the password field is changed to authentication_string, so the UPDATE user SET Authentication_string=password ("123456") WHERE user= ' root ';


7. mysql Console shortcut established:
1) object location input, new shortcut, right-click, Desktop: C:\Windows\System32\cmd.exe
Shortcut name self-defined, OK, shortcut established successfully
2) Right-click the shortcut you just created, and then change the target column to the MySQL startup parameter:
C:\Windows\System32\cmd.exe "D:\Program files\mysql\mysql-5.6.13-win32\bin"/k mysql-uroot-p Inventory
Explanation: cmd path "mysql Path bin directory"/k mysql-u user name-p password database name
3) Click OK to save after the modification, double click the shortcut to connect to MySQL database

Use the interface tool (Navicat Premium) to connect to MySQL:

The Access denied for user problem processing occurs:

1. Change the table method. It may be that your account is not allowed to log on remotely, only on localhost. This time, as long as the computer on the localhost, log in to MySQL, change the "MySQL" Database in the "User" table "host", from "localhost" to "%"

Mysql-u Root-pvmware
Mysql>use MySQL;
Mysql>update User Set host = '% ' where user = ' root ';
Mysql>select host, user from user;

Restart the MYSQLD service or enter the flush privileges at the MySQL command line after the change.

Then use the Navicat to change the user table under the MySQL library under the localhost set to the same as *.

Download and installation of MySQL free installation version

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.