Linux installation mysql5.6 Yum

Source: Internet
Author: User
Tags mysql create mysql version mysql create user

Install MySQL:

1 View MySQL:2 3Rpm-qa | grep-i mysql4 5 install the necessary environment6 7Yum-y Install gcc gcc-c++ ncurses-devel Perl8 9 Ten To View the environment: OneRpm-qa | grep-I gcc A  - before compiling and installing MySQL, you need to create MySQL users and groups, create MySQL installation directories, and store directories.  -  the groupadd MySQL Create user group -  -useradd-g MySQL mysql-s/bin/falsecreate MySQL user join MySQL group -  +Mkdir-p/data/mysql create MySQL database storage directory -  +Chown-r mysql:mysql/data/MySQL set permissions for MySQL database storage A  atMkdir-p/usr/local/mysql create MySQL installation directory

General CentOS systems do not have their own installation CMake compilation tools, Yum may not be able to install CMake compiler tools, so, this test machine download CMake source code compilation tool and MySQL source installation package. (MySQL version 5.5 or later (including MySQL version 5.5) needs to be compiled with the CMake tool and cannot be compiled with./configure):

  

CMake Official website:

https://cmake.org/download/

MySQL Source installation package:

Note:MySQL 5.7 or later (with MySQL version 5.7) will prompt for errors when compiling with CMake, which requires boost package support.

Official website:https://dev.mysql.com/downloads/mysql/

Other:http://mirrors.sohu.com/mysql/ (this test machine used this, download mysql-5.5.53.tar.gz installation package)

Download Cmake:wget https://cmake.org/files/v3.8/cmake-3.8.0.tar.gz

Download Mysql:wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.16.tar.gz

Upload the downloaded cmake-3.7.2.tar.gz and mysql-5.5.53.tar.gz installation packages to the CentOS 6.5 created folder/home/mysql to unzip.

(Decompression command TAR–ZXVF cmake-3.7.2.tar.gz)

Compile and install the CMake compilation tool. ( execute ./configure Check the configuration, then make compile, and finally do install)

Compile and install the MySQL package. ( execute CMake First -dcmake_install_prefix=/usr/local/mysql-dmysql_datadir=/data/mysql-dsysconfdir=/etc. make Final execute make install)

Description: (mainly used to three parameter values, the online section of the graph for reference only, the MySQL installation path to the above operation will prevail)

Generate MySQL system database, add MY.CNF profile soft Connect

MySQL adds the system boot auto-start function.

Add the MySQL service to the system environment variable.

Start the MySQL service.

The input mysql–uroot-p login test was successful.

Change Password:

Linux:mysql Connection Navicat:

Special operation:

  

#把mysql库文件链接到系统默认位置, future software like PHP can not specify the MySQL library file address.

[Email protected] mysql]# ln-s/usr/local/mysql/lib/mysql/usr/lib/mysql

[Email protected] mysql]# ln-s/usr/local/mysql/include/mysql/usr/include/mysql

#创建mysql启动文件 Mysql.sock Soft links. (Mysql.sock function is for example, you do not need to define the specific IP address of the host, as long as the empty or localhost can, if the file is deleted, use the localhost user to connect to the MySQL server. )

[Email protected] mysql]# Mkdir/var/lib/mysql

[Email protected] mysql]# ln-s/tmp/mysql.sock/var/lib/mysql/mysql.sock

Linux installation mysql5.6 Yum

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.