MySQL Data installation linux+windows

Source: Internet
Author: User

First, Linux system installation MYSQL1. Linux installation MySQL service is divided into two installation methods: 1.1 Source Installation:

The advantage is that the installation package is relatively small, only more than 10 m, the disadvantage is that the installation depends on the number of libraries, installation time is long, the installation steps are complex and error-prone;

1.2 Using an officially compiled binary file installation:

The advantage is that the installation speed is quick, the installation procedure is simple, the disadvantage is that the installation package is large, about 300M. The following describes Linux using an officially compiled binary package to install MySQL.

2. Installation Steps

2.1 upload the MySQL installation package from the Linux system to the server via the tool;

2.2 will upload the mysql-5.6.38-linux-glibc2.12-x86_64.tar.gz by unzipping the command

  Install package Decompression Execution command: TAR-ZXVF mysql-5.6.38-linux-glibc2.12-x86_64.tar.gz

Copy the extracted files to the/usr/local/mysql path

  Copy execution command: CP mysql-5.6.38-linux-glibc2.12-x86_64/usr/local/mysql-r

2.3 Add system MySQL Group and MySQL user

  Execute command: Groupadd MySQL and useradd-r-g MySQL MySQL

  Note: The situation I have added has been added in will prompt you already exist

  

2.4 Install the database, and then execute the command

Execute command 1:cd/usr/local/mysql //Go to install MySQL software directory

Execute command 2:chown-r mysql:mysql./ /Modify current directory owner for MySQL user

Execute command 3:./scripts/mysql_install_db--user=mysql //Install Database

Execute command 4:chown-r root:root./ /Modify the current directory owner as the root user

Execute command 5:chown-r mysql:mysql Data //modify Current Data directory owner for MySQL user

2.5 Starting the MySQL service and adding boot

Execute command:CP support-files/mysql.server/etc/init.d/mysql //Add power-on self-start

Execute command: Servicemysql start //start MySQL service, see starting MySQL ...  success! On behalf of the service started successfully

2.6 Setting the root user initial password for MySQL

  Execute command:./bin/mysqladmin-u root password ' root ' //set root password to root (password for reference only)

2.7 Setting the MySQL client to the default path

Execute command:ln-s/usr/local/mysql/bin/mysql/usr/local/bin/mysql

3. Set the host IP for remote access

3.1 Entering MySQL by command

Execute command:mysql-uroot-proot //-U is user name-p is the database login password

3.2 Set the access host IP address, on the basis of 3.1, execute the following command sequentially

Execute command 1: Usemysql; //Select Database

Execute command 2: select * from user where user= ' root '; View the host value of the user table in the MySQL library (the first row of the host is my modified one)

  

Execute Command 3:update user Set host = ' 192.168.80.192 ' where user = ' root ' limit 1; Note: Modify the address to the current system's IP address (after the updated effect such as, you can execute the command 2 view)

Execute command 4:flush privileges; Refresh MySQL system permissions when the related table is complete, you can perform a restart

4. Connect to the database via the Navicat for MySQL tool

  

Second, Windows installation MySQL database installation procedures
    1. Open the installation package and click Next.

2. Tick as Next

  

3. Select Custom

  

4. The path can be changed, I am the selected default, click Next

  

5. Click Install

6. Click on the left pop-up image Next

7. If selected, click Finish

8. Click Next

  

9. Click Next If you choose

  

  

  

  

  

  10. Select as:

  

11. Set the login password and click Next.

  

12. Click Execute directly and wait, as.

  

13. Finish Click Finish installation Complete

14. Verify: Find the installed MySQL client input password set at installation

  

15. Password verification completed, login successful.

  

MySQL Data installation linux+windows

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.