Install MySQL 5.5 full process share under CentOS 5.5

Source: Internet
Author: User
Tags php mysql readline

Open Terminal

Switch to the root directory

[Shell@localhost ~]# Su-Uninstall the Mysql5.0 that comes with CentOS before installing Mysql5.5.

[Root@localhost ~]# yum Remove MySQL

Installing CMake

Download CMake Source Package cmake-2.8.5.tar.gz

[Root@localhost ~]# wget http://www.cmake.org/files/v2.8/cmake-2.8.5.tar.gz compile and install [email protected]]# tar xzvf cmake-2.8.5.tar.gz [[Email protected]]# cd cmake-2.8.5 [[email protected] cmake-2.8.5]#./bootstrap Error when Bootstrapp ing cmake:cannot find appropriate C compiler on the This system. Please specify one using environment variable CC. See Cmake_bootstrap.log for compilers attempted. Error: C compiler is missing.

Workaround: Install the GCC compiler

Can be installed from the installation disk of a Linux system, or can be easily installed with Yum

[[email protected] ~]# Yum install gcc

Continue with CMake installation

[[email protected] cmake-2.8.5]#./bootstrap Error when bootstrapping cmake:cannot find appropriate C + + compiler on this System. Please specify one using environment variable CXX. See Cmake_bootstrap.log for compilers attempted. Error again: the C + + compiler is missing.

Installing the gcc-c++ compiler

It can also be installed from the installation disk of a Linux system, or simply with Yum

[email protected] ~]# Yum install gcc-c++

repeat the above action

[Email protected] cmake-2.8.5]#./bootstrap

After no error, compile and install

[email protected] cmake-2.8.5]# make [[E-mail protected] cmake-2.8.5]# make Install[[email protected] cmake-2.8.5]# CMake -version

start a formal installation of MySQL

Adding MySQL users and user groups

[[email protected] ~]# groupadd MySQL [[email protected] ~]# useradd-g MySQL MySQL

Download the MySQL source package mysql-5.5.27.tar.gz

[[email protected] ~]# wget http://dev.mysql.com/Downloads/MySQL-5.5/mysql-5.5.27.tar.gz Decompression

[[email protected] ~]# cd/usr/local/[[email protected] local]# tar xzvf mysql-5.5.27.tar.gz[[email protected] local]# CD mysql-5.5.27

CMake Run

[Email protected] mysql-5.5.27]# CMake.

Error:

--Could not find Curses (missing:curses_library curses_include_path) CMake Error at cmake/readline.cmake:82 (MESSAGE): C Urses 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:250 (mysql_check_readline)--Configuring incomplete, Errors occurred!

Workaround:

[Email protected] mysql-5.5.27]# RM CMakeCache.txt [[email protected] mysql-5.5.27]# yum-y install ncurses-devel*

re-cmake run

[Email protected] mysql-5.5.27]# CMake. There's a warning.

Warning:bison executable not found in path has a warning, resolves it, and installs it without Bison

[email protected] mysql-5.5.27]# Yum Install Bison

run again, no error

[Email protected] mysql-5.5.27]# CMake. Before compiling the installation, you can set the configuration options for the installation

[[email protected] mysql-5.5.27]#./configure--help Choose the options you want to set according to the Help information, but you can also skip this step and press the default settings


#开始编译安装, the time is a little bit longer ...

[[email protected] mysql-5.5.27]# make && make install finish compiling installation

Go to the installation directory, change the ownership of the program binaries to root, change the ownership of the data directory to the MySQL user, update the authorization form

[Email protected] mysql-5.5.27]# cd/usr/local/mysql[[email protected] mysql]# chown-r root. [[email protected] mysql]# chown-r MySQL. [[email protected] mysql]# chgrp-r MySQL. [[email protected] mysql]# scripts/mysql_install_db--user=mysql Initialize database [[email protected] mysql]#/usr/local/mysql/ scripts/mysql_install_db--user=mysql--basedir=/usr/local/mysql--datadir=/usr/local/mysql/data secure boot MySQL

[[email protected] mysql]#./bin/mysqld_safe--user=mysql Close MySQL

[[email protected] mysql]#./bin/mysqladmin-u root shutdown-p default password is empty convenient to call, set a soft link for MySQL [[email protected] ~]# ln-s/usr/l Ocal/mysql/bin/mysql/usr/bin/mysql

Other Settings processing:

Set the options file to copy the configuration file to/etc

[[email protected] mysql]# CP support-files/my-medium.cnf/etc/mysql.cnf Setup boot from [[email protected] mysql]# CP support-files/mysql.server/etc/init.d/mysql [[email protected] mysql]# chmod +x/etc/init.d/mysql [[email protected] mysql]# chkconfig–add mysqld[[email protected] mysql]# chkconfg mysqld on

MySQL server can now be started and shut down by service

[[Email protected] ~]# service mysql start [[email protected] ~]# service MySQL shutdown

connecting to a server

[Email protected] ~]# mysql-u root-pyourpasswordwelcome to the MySQL monitor. Commands End With; or \g.your MySQL connection ID is 3-to-server version:5.5.27 Source distributinotype ' help, ' or ' \h ' for help. The type ' \c ' to clear the buffer.mysql> ...mysql> prompt tells you that MySQL is ready to enter commands for you.

MySQL is now installed and can be used

Mysql> QUIT

Articles you may be interested in:
    • MySQL database server configuration method on CentOS
    • Centos+nginx+php+mysql detailed configuration (plot)
    • CENTOS6 steps to install PHP MySQL gd with Yum
    • CentOS 6.4 Installation Configuration Lnmp server (nginx+php+mysql)
    • CentOS 6.4 Installation Configuration Lamp server (APACHE+PHP5+MYSQL)
    • Parse the default installation path for Apache, PHP, and MySQL in CentOS
    • Share CentOS under the latest version of MySQL 5.6.13 source installation process
    • Hadoop2.x/yarn Environment Build--centos7.0 JDK Configuration
    • Stop Tomcat run script code under CentOS
    • Simple logging cent OS server configuration Jdk+tomcat+mysql

Install MySQL 5.5 All-in-process sharing under CentOS 5.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.