MySQL 5.7 rpm mode from download to installation

Source: Internet
Author: User
Tags mysql client rehash

Miscellaneous Knowledge Points:

Sync Time:

Yum-y Install NTP

Whereis NTP

Ntpdate time.nist.gov Synchronize the time command, and then add a scheduled task. NIST (National Institut of Standard Technology)

Crontab-e

*/10 * * * * ntpdate time.nist.gov


MySQL 5.7 Installation: Environment: VirtualBox virtual machine on Mac: Nat mode. os:centos6.7.

wget Https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.19-1.el6.x86_64.rpm-bundle.tar

TAR-XF Mysql-5.7.19-1.el6.x86_64.rpm-bundle.tar


Install in the following order because there are dependencies between them

Common--libs---Clients server

$ rpm -ivh mysql-community-common-5.7.19-1.el6.x86_64.rpm $ rpm -ivh mysql-community-libs-5.7.19-1.el6.x86_64.rpm $ rpm -ivh mysql-community-clients-5.7.19-1.el6.x86_64.rpm $ rpm -ivh mysql-community-server-5.7.19-1.el6.x86_64.rpm


If this error occurs: (This error was not encountered when I installed it)

error: Failed dependencies: \          libnuma.so.1()(64bit) is needed by mysql-community-server-5.7.19-1.el6.x86_64 \          libnuma.so.1(libnuma_1.1)(64bit) is needed by mysql-community-server-5.7.19-1.el6.x86_64 \          libnuma.so.1(libnuma_1.2)(64bit) is needed by mysql-community-server-5.7.19-1.el6.x86_64

Workaround:

yum  install  -y Numactl


After the installation is complete:

Want to know where to install it:

Whereis mysqld

Which mysqld


Initialize MYSQLD:

1, Setenforce 0 off SELinux, otherwise it will error.

2,/usr/sbin/mysqld--user=mysql--datadir=/usr/local/src/mysql5.7/


Start mysqld:

Service mysqld Start

Ps-ef |grep MySQL


Log in mysqld with the MySQL client:

Mysql-u Root-p This root does not matter to the root of the Linux system, it is the root user of mysqld.

If error: Mysql.sock can not find, need vim/etc/my.cnf

Add to:

[MySQL]

Socket=/usr/local/src/mysql5.7/mysql.sock

Restart the MYSQLD service.


Note: Enter the password: The 5.7 version of the password will be in the initialization, in the MySQL log file, 5.6 is placed in the ~./mysql_secret file. After you find the password from log, paste it.

After logging in, you will be prompted: your password expires or prompt: You must change the password

Set password = password (' 123456 ')

OK, let's create a library and a table to play with:

Build Library: Create Database myuser;

Into the library: use MyUser;

Build tables: CREATE TABLE Nason (ID int (+) NOT NULL PRIMARY key Auto_increment,username varchar (+) not null,password varchar (255) Not null,sex Int (2), age Int (ten), phone int (one), email varchar (+), role Int (ten)) Engine=innodb DEFAULT Charset=utf8;

MySQL, using the tab completion function, only need to modify the MY.CNF configuration file.

[MySQL] #no-auto-rehashauto-rehash #添加auto-rehash


You are welcome to correct, supplement and make progress together.

This article is from the "Nginx" blog, please be sure to keep this source http://bajiebushizhu.blog.51cto.com/13206038/1961967

MySQL 5.7 rpm mode from download to installation

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.