Install and configure MySQL 5.5.20 in Redhat

Source: Internet
Author: User

The latest mysql versions require cmake compilation and installation. It is estimated that this method will be used in future versions. Therefore, we will record the installation steps and procedures for your reference.
Note: This installation is the latest toolkit installed under the default RedHat, such as GNU make, GCC, Perl, libncurses5-dev, if there is a missing toolkit found during the compilation and installation process, first, download and install yum install separately before continuing.

Related Tutorials:

Install MySQL 5.1.7 and Navicat 8 in RedHat Linux 2.6.18.

Redhat9 under the installation of mysql-4.0.26 to see

For installation and maintenance of MySQL 5.6 in RedHat, see

1. download the required software using wget in linux and save it to the/usr/local/src directory.

Wget ftp://mirror.switch.ch/mirror/mysql/Downloads/MySQL-5.5/mysql-5.5.20.tar.gz

Wget http://www.cmake.org/files/v2.8/cmake-2.8.7.tar.gz

Wget http://ftp.gnu.org/gnu/bison/bison-2.5.tar.gz

Ii. Install cmake
Cd/usr/local/src
Tar zxvf cmake-2.8.7.tar.gz
Cd cmake-2.8.7.tar.gz
./Bootstrap
Gmake
Gmake install
Cd ../

Tar zxvf bison-2.5.tar.gz
Cd bison-2.5
./Configure
Make
Make install
Cd ../

Iii. Compile and install MySQL 5.5.20
Groupadd-g 1000 mysql
Useradd-u 1000-g mysql
Tar xvf mysql-5.5.20.tar.gz
Cd mysql-5.5.20/
/Usr/local/bin/cmake.

-DCMAKE_INSTALL_PREFIX =/usr/local/mysql \
-DMYSQL_UNIX_ADDR =/tmp/mysql. sock \
-DDEFAULT_CHARSET = utf8 \
-DDEFAULT_COLLATION = utf8_general_ci \
-DWITH_EXTRA_CHARSETS: STRING = utf8, gbk \
-DWITH_MYISAM_STORAGE_ENGINE = 1 \
-DWITH_INNOBASE_STORAGE_ENGINE = 1 \
-DWITH_MEMORY_STORAGE_ENGINE = 1 \
-DWITH_DEBUG = 0 \
-DWITH_READLINE = 1 \
-DENABLED_LOCAL_INFILE = 1 \
-DMYSQL_DATADIR =/home/mysql/data \
-DMYSQL_USER = mysql

-- Cocould NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)
CMake Error at cmake/readline. cmake: 82 (MESSAGE ):
Curses library not found. Pleaseinstall appropriate package,
RemoveCMakeCache.txt and rerun cmake. On Debian/Ubuntu, package name islibncurses5-dev, on Redhat and derivates it is ncurses-devel.
Call Stack (most recent call first ):
Cmake/readline. cmake: 117 (FIND_CURSES)
Cmake/readline. cmake: 213 (MYSQL_USE_BUNDLED_READLINE)
CMakeLists.txt: 250 (MYSQL_CHECK_READLINE)

Yum install ncurses-devel
Rm CMakeCache.txt
-- Start the cmake operation again.
Make
Make install
Chmod + w/usr/local/mysql
Chown-R mysql: mysql/usr/local/mysql
Ln-s/usr/local/mysql/lib/libmysqlclient. so.18/usr/lib/libmysqlclient. so.18
Mkdir-p/usr/local/mysql/data
Chown-R mysql: mysql/usr/local/mysql/data
Ln-s/usr/local/mysql/data/home/mysql/data
Mkdir-p/var/mysql/log/
Chown-R mysql: mysql/var/mysql/
Cd support-files/
Cp my-large.cnf/etc/my. cnf
Cp mysql. server/etc/init. d/mysqld

  • 1
  • 2
  • Next Page

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.