Install MySQL on CentOS6.5

Source: Internet
Author: User
Tags crc32 deprecated

1. View information about the operating system

2. Check all MySQL RPM packages on the system and delete

[Email protected] ~]# Rpm-qa | Grep-i MySQL

[Email protected] ~]# yum-y Remove Mysql-libs-5.1*

3. Download the RPM package required for MySQL-5.6.21

[Email protected] tools]# wget http://dev.mysql.com/Downloads/MySQL-5.6/MySQL-server-5.6.21-1.rhel5.x86_64.rpm
[Email protected] tools]# wget http://dev.mysql.com/Downloads/MySQL-5.6/MySQL-devel-5.6.21-1.rhel5.x86_64.rpm
[Email protected] tools]# wget http://dev.mysql.com/Downloads/MySQL-5.6/MySQL-client-5.6.21-1.rhel5.x86_64.rpm

4. Installation of three RPM packages

[Email protected] tools]# RPM-IVH mysql-server-5.6.21-1.rhel5.x86_64.rpm

If this is the process, congratulations on your failure, because the previously installed MySQL is not clean and will cause a variety of messy mistakes.

Preparing ... ########################################### [100%]
1:mysql-client ########################################### [100%]

Workaround: View the remaining directories and delete the associated files

Whereis MySQL

Rm–rf/usr/lib64/mysql

Rm–rf/usr/my.cnf
Rm-rf/root/.mysql_sercret

Rm-rf/var/lib/mysql

The right process:

Preparing ... ########################################### [100%]

1:mysql-server ########################################### [100%]

2017-09-25 13:46:09 0 [Warning] TIMESTAMP with implicit the DEFAULT value is deprecated. --explicit_defaults_for_timestamp server option (see documentation for more details).

2017-09-25 13:46:09 2188 [Note] innodb:using Atomics to ref count buffer pool pages

2017-09-25 13:46:09 2188 [Note] innodb:the InnoDB memory heap is disabled

2017-09-25 13:46:09 2188 [Note] innodb:mutexes and rw_locks use GCC atomic builtins

2017-09-25 13:46:09 2188 [Note] innodb:memory barrier is not used

2017-09-25 13:46:09 2188 [Note] innodb:compressed tables use zlib 1.2.3

2017-09-25 13:46:09 2188 [Note] innodb:using Linux native AIO

2017-09-25 13:46:09 2188 [Note] innodb:using CPU CRC32 Instructions

2017-09-25 13:46:09 2188 [Note] innodb:initializing buffer pool, size = 128.0M

2017-09-25 13:46:09 2188 [Note] innodb:completed initialization of buffer pool

2017-09-25 13:46:09 2188 [Note] innodb:the first specified data file./ibdata1 did not exist:a new database to be create D!

2017-09-25 13:46:09 2188 [Note] innodb:setting file./ibdata1 size to MB

2017-09-25 13:46:09 2188 [Note] Innodb:database physically writes the file full:wait ...

2017-09-25 13:46:09 2188 [Note] innodb:setting log file./ib_logfile101 size to + MB

2017-09-25 13:46:09 2188 [Note] innodb:setting log file./ib_logfile1 size to + MB

2017-09-25 13:46:10 2188 [Note] innodb:renaming log file./ib_logfile101 to./ib_logfile0

2017-09-25 13:46:10 2188 [Warning] innodb:new log files created, lsn=45781

2017-09-25 13:46:10 2188 [Note] innodb:doublewrite buffer not found:creating new

2017-09-25 13:46:10 2188 [Note] Innodb:doublewrite buffer created

2017-09-25 13:46:10 2188 [Note] innodb:128 rollback segment (s) is active.

2017-09-25 13:46:10 2188 [Warning] innodb:creating FOREIGN KEY constraint system tables.

2017-09-25 13:46:10 2188 [Note] innodb:foreign key constraint system tables created

2017-09-25 13:46:10 2188 [Note] innodb:creating tablespace and datafile system tables.

2017-09-25 13:46:10 2188 [Note] innodb:tablespace and datafile system tables created.

2017-09-25 13:46:10 2188 [Note] innodb:waiting for purge to start

2017-09-25 13:46:10 2188 [Note] innodb:5.6.21 started; Log sequence number 0

A random root password has been set. You'll find it in '/root/.mysql_secret '.

2017-09-25 13:46:14 2188 [Note] Binlog End

2017-09-25 13:46:14 2188 [Note] innodb:fts optimize thread exiting.

2017-09-25 13:46:14 2188 [Note] innodb:starting shutdown ...

2017-09-25 13:46:15 2188 [Note] Innodb:shutdown completed; Log sequence Number 1625977

2017-09-25 13:46:15 0 [Warning] TIMESTAMP with implicit the DEFAULT value is deprecated. --explicit_defaults_for_timestamp server option (see documentation for more details).

2017-09-25 13:46:15 2211 [Note] innodb:using Atomics to ref count buffer pool pages

2017-09-25 13:46:15 2211 [Note] innodb:the InnoDB memory heap is disabled

2017-09-25 13:46:15 2211 [Note] innodb:mutexes and rw_locks use GCC atomic builtins

2017-09-25 13:46:15 2211 [Note] innodb:memory barrier is not used

2017-09-25 13:46:15 2211 [Note] innodb:compressed tables use zlib 1.2.3

2017-09-25 13:46:15 2211 [Note] innodb:using Linux native AIO

2017-09-25 13:46:15 2211 [Note] innodb:using CPU CRC32 Instructions

2017-09-25 13:46:15 2211 [Note] innodb:initializing buffer pool, size = 128.0M

2017-09-25 13:46:15 2211 [Note] innodb:completed initialization of buffer pool

2017-09-25 13:46:15 2211 [Note] innodb:highest supported file format is Barracuda.

2017-09-25 13:46:15 2211 [Note] innodb:128 rollback segment (s) is active.

2017-09-25 13:46:15 2211 [Note] innodb:waiting for purge to start

2017-09-25 13:46:15 2211 [Note] innodb:5.6.21 started; Log sequence Number 1625977

2017-09-25 13:46:15 2211 [Note] Binlog End

2017-09-25 13:46:15 2211 [Note] innodb:fts optimize thread exiting.

2017-09-25 13:46:15 2211 [Note] innodb:starting shutdown ...

2017-09-25 13:46:17 2211 [Note] Innodb:shutdown completed; Log sequence Number 1625987

A RANDOM PASSWORD have BEEN SET for the MySQL root USER!

You'll find that password in '/root/.mysql_secret '.

You must change this password on your first connect,

No other statement but ' SET PASSWORD ' would be accepted.

See the Manual for the semantics of the ' password expired ' flag.

Also, the anonymous user has been removed.

In addition, you can run:

/usr/bin/mysql_secure_installation

Which would also give you the option of removing the test database.

This is the strongly recommended for production servers.

See the Manual for more instructions.

Problems at http://bugs.mysql.com/

The latest information about MySQL was available on the Web at

Http://www.mysql.com

Support for MySQL by buying support/licenses at http://shop.mysql.com

New Default Config file was created as/usr/my.cnf and

Would be used by default by the server when you start it.

You could edit this file to the Change server settings

Warning:default config FILE/ETC/MY.CNF exists on the system

This file is being read by default by the MySQL server

Either remove it, or use the want

--defaults-file argument to Mysqld_safe when starting the server

[Email protected] tools]# RPM-IVH mysql-client-5.6.21-1.rhel5.x86_64.rpm

Preparing ... ########################################### [100%]

1:mysql-client ########################################### [100%]

[Email protected] tools]# RPM-IVH mysql-devel-5.6.21-1.rhel5.x86_64.rpm

Preparing ... ########################################### [100%]

1:mysql-devel ########################################### [100%]

5. Modify the configuration file location

[Email protected] tools]# CP/USR/SHARE/MYSQL/MY-DEFAULT.CNF/ETC/MY.CNF

[email protected] tools]# cp-a /usr/share/mysql/ Mysql.server/etc/init.d/mysqld

6. Initialize MySQL

  [email protected] tools]#/usr/bin/mysql_install_db  

7. Start MySQL

[Email protected] mysql]#/etc/init.d/mysql restart

When installing, refer to the http://www.linuxidc.com/Linux/2015-04/116003.htm

Install MySQL on CentOS6.5

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.