centos6.5 Compiling and installing mysql5.6.14

Source: Internet
Author: User
Tags openssl readline mysql login

1 Check if MySQL is installed on the machine

Rpm-qa | grep MySQL

2. Delete the existing MySQL

Rpm-e--nodeps MySQL () brute force delete mode)

3. Install the packages required for compiling the code

Yum-y install gcc gcc-devel gcc-c++ gcc-c++-devel autoconf* automake* zlib* libxml* ncurses-devel ncurses libgcrypt* libt ool* cmake OpenSSL openssl-devel Bison bison-devel unzip-y

4. Unzip the compiler: TAR-ZXVF mysql-5.6.14.tar.gz
CD mysql-5.6.14

Compile and install: mysql5.5 later compile and install using CMake

CMake \
-dcmake_install_prefix=/usr/local/mysql \
-dmysql_datadir=/usr/local/mysql/data \
-dwith_myisam_storage_engine=1 \
-dwith_innobase_storage_engine=1 \
-dwith_memory_storage_engine=1 \
-dwith_readline=1 \
-dmysql_unix_addr=/var/lib/mysql/mysql.sock \
-dmysql_tcp_port=3306 \
-denabled_local_infile=1 \
-dwith_partition_storage_engine=1 \
-dextra_charsets=all \
-ddefault_charset=utf8 \


If an error occurs:
--MySQL 5.5.8
--Could not find Curses (missing:curses_library curses_include_path)
CMake Error at cmake/readline.cmake:82 (MESSAGE):
Curses Library not found. Please install the appropriate package,

Remove CMakeCache.txt and rerun CMake. On Debian/ubuntu, package name was Libncurses5-dev, on Redhat and derivates it was ncurses-devel.
Call Stack (most recent call first):
cmake/readline.cmake:126 (find_curses)
cmake/readline.cmake:216 (Mysql_use_bundled_libedit)
cmakelists.txt:256 (Mysql_check_readline)

--Configuring incomplete, Errors occurred!

You will need to install Yum-y installation ncurses-devel-y ******* and delete the CMakeCache.txt file. Re-compile once and then OK

5 Make && make install

6. Create MySQL user and MySQL group

Groupadd MySQL

Useradd-s/sbin/nologin-g mysql-m MySQL

-M: Do not create home directory

7. Modify/usr/local/mysql Permissions

Chown-r Mysql:mysql/usr/local/mysql

8 ...

Enter the installation path, execute the initialization configuration script, create the system's own database and table


9 Starting the database

/usr/local/mysql/bin/mysqld_safe &

10 Add service, Copy Service script to INIT.D directory

CP Support-files/mysql.server/etc/init.d/mysqld
Chkconfig MySQL on
/etc/init.d/mysqld start

11 Configuring the MySQL Global usage path


Added path= $PATH:/usr/local/mysql/bin/

Echo $PATH


Make path effective

MySQL login command

Mysql-u root-p

Modify MySQL login password (default is empty)

mysqladmin-u root password ' 123456 '

15 Viewing the system comes with a table

Mysql>show databases;

16 to set the root user to have remote access, execute

Mysql> GRANT All privileges on * * to ' root ' @ ' 192.168.% ' identified by ' 123456 ' with GRANT OPTION; When the red password is remote access, the root user's password can be different from the local.

17 Firewall 3306 port is not turned on by default, to remote access, you need to open this port


-A input-m state--state new-m tcp-p-dport 3306-j ACCEPT

This article is from "Linux Ops beginner" blog, please make sure to keep this source http://ht712.blog.51cto.com/9397612/1555060

centos6.5 Compiling and installing mysql5.6.14

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.