Install and configure mysql5.6.33 in Linux

Source: Internet
Author: User

Install and configure mysql5.6.33 in Linux

This tutorial shares with you how to install and configure mysql5.6.33 in linux for your reference. The specific content is as follows:

1. Download

: Http://dev.mysql.com/downloads/mysql/5.6.html#downloads

Download version: I have selected 5.6.33, general edition, and 64-bit linux.

You can also copy 64-bit data directly and download it using the command:Copy codeThe Code is as follows: wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.33-linux-glibc2.5-x86_64.tar.gz

2. Decompress

# Unzip tar-zxvf mysql-5.6.33-linux-glibc2.5-x86_64.tar.gz # copy the decompressed mysql directory cp-r mysql-5.6.33-linux-glibc2.5-x86_64/usr/local/mysql

3. Add User Groups and users

# Add User Group groupadd mysql # Add User mysql to user group mysqluseradd-g mysql

4. Installation

Cd/usr/local/mysql/<br> mkdir. /data/mysqlchown-R mysql: mysql. /. /scripts/mysql_install_db -- user = mysql -- datadir =/usr/local/mysql/data/mysqlcp support-files/mysql. server/etc/init. d/mysqldchmod 755/etc/init. d/mysqldcp support-files/my-default.cnf/etc/my. cnf # modify the startup script vi/etc/init. d/mysqld # modify the entry: basedir =/usr/local/mysql/datadir =/usr/local/mysql/data/mysql # start service mysqld start # test the connection. /mysql/bin/mysql-uroot # Add the environment variable and edit/etc/profile. In this way, you can run mysql Command export PATH = $ PATH anywhere: /usr/local/mysql // bin <br> source/etc/profile # start mysqlservice mysqld start # disable mysqlservice mysqld stop # view the running status service mysqld status

5. Error

5.1 error 1130 is reported when sqlyog is connected because the remote connection user permission is not granted.

Solution 1:Change the 'host' entry in the 'mysql' database 'user' table from 'localhost' to '% '.

use mysql;select 'host' from user where user='root'; update user set host = '%' where user ='root';flush privileges; 

Solution 2:Direct authorization

Copy codeThe Code is as follows: grant all privileges on *. * TO 'root' @ '%' identified by 'youpassword' with grant option;

5.2 installation errors

-Bash:./scripts/mysql_install_db:/usr/bin/perl: bad interpreter: No file or directory

Solution:Yum-y install perl-devel

Installing MySQL system tables.../bin/mysqld: error while loading shared libraries: libaio. so.1: cannot open shared object file: No such file or directory
Solution:Yum-y install libaio-devel

6. Others

6.1 configure Environment Variables

Vi +/etc/profile

Export PATH =...:/usr/local/mysql/bin

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

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.