CentOS6.8 under mysql5.6rpm manual Installation

Source: Internet
Author: User
Tags mysql client mysql download mysql version

1. Preparation

System environment: Virtual machine under centos6.8,64 bit, Desktop standard installation (not minimized)

MySQL version: 5.6.35

Installation Method: rpm

2. mysql Download

Sohu Image: http://mirrors.sohu.com/mysql/MySQL-5.6/

Download the following installation package:

mysql-client-5.6.35-1.el6.x86_64.rpm

mysql-server-5.6.35-1.el6.x86_64.rpm

3, remove the original MySQL
1 #查询已安装的rpm包 2 grep -i mysql3#对已安装的rpm包执行写下命令, where xxx is the full name of the query out RPM package 4 rpm-e--nodeps xxx
4. Install MySQL
1 #安装MySQL-client2 rpm-ivh mysql-client-5.6. 1. el6.x86_64.rpm3 #安装MySQL-server4 rpm-ivh mysql-server- 5.6. 1. el6.x86_64.rpm

Mysql-server after the installation is completed, note its log output, you can learn: (1) mysql configuration file for/usr/my.cnf, (2) The initial MySQL password in the file/root/.mysql_secret.

5. mysql Configuration5.1 Setting a password

Start MySQL services: service MySQL Start

Open the file Root/.mysql_secret, copy the initial password, and log in to the MySQL client

 1  #<  init_passwd>  for file Root/ .mysql_ Secret heavy initial face  2  mysql - Uroot–p<  init_passwd>  3  #<  new_passwd >   4  set  PASSWORD =  PASSWORD ( '  <NEW_PASSWD>   " )  5  exit  
5.2 Remote Access authorization settings

Log in to the MySQL client with a new password

1 /*switch to MySQL database*/2  UseMySQL;3 /*Update Root user password*/4 Update User SetPassword=Password'<new_passwd>')where User='Root';5 /*permission to authorize any host to access data*/6 GRANT  All Privileges  on *.*  to 'Root'@'%'Identified by '<new_passwd>'  with GRANT OPTION;7 /*Refresh to make the changes take effect*/8FlushPrivileges;9 Exit
5.3 Power-on self-booting
1 chkconfig MySQL on
5.4 Optimization Settings

Open the MySQL configuration file/usr/my.cnf, and modify the following:

[Mysqld]port=3306default-storage-engine=innodb Lower_case_table_names=1 Max-connections=3000character_set_server =utf8
[MySQL] Default-character-set=utf8

After modifying the MySQL, the MySQL installation is complete.

CentOS6.8 under mysql5.6rpm manual installation

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.