Install MySQL5.5 note_mysql under CentOS5.5

Source: Internet
Author: User
Tags localhost mysql mysql download
Install MySQL5.5 under CentOS 5.5

BitsCN.com
There are many related installation notes on the network for installing MySQL 5.5 notes under CentOS5.5, but they are not detailed, or the compilation environment is slightly different, the process will be different, therefore, I have summarized my existing experience and experience during my own installation, expanded and recorded the entire process in detail. I chose to install MySQL 5.5.27. Here are my installation notes. Open the terminal and switch to the root directory [shell @ localhost ~] # Su-uninstall Mysql5.0 from CentOS before installing Mysql5.5. [Root @ localhost ~] # Yum remove mysql install cmakedownload cmakesource code 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 [root @ localhost] # tar xzvf cmake-2.8.5.tar.gz [root @ localhost] # cd cmake-2.8.5 [root @ localhost cmake-2.8.5] #. /bootstrap Error when bootstrapping CMake: Cannot find appropriate C compiler on this system. please specify one using environment variable CC. see cmake_bootstrap.log for compilers attempted. error: The C compiler is missing. Solution: install the gcc compiler from the installation disk of the Linux system, or simply use yum to install [root @ localhost ~] # Yum install gcc continue the installation of cmake [root @ localhost 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. another error is reported: The C ++ compiler is missing. You can also install the gcc-c ++ compiler from the installation disk of the Linux system, or simply use yum to install [root @ localhost ~] # Yum install gcc-c ++ repeat the operation above [root @ localhost cmake-2.8.5] #. /after no error is reported in bootstrap, compile and install [root @ localhost cmake-2.8.5] # make [root @ localhost cmake-2.8.5] # make install [root @ localhost cmake-2.8.5] # cmake-version start to formally install Mysql add mysql users and user groups [root @ localhost ~] # Groupadd mysql [root @ localhost ~] # Useradd-g mysql download the mysql source code package mysql-5.27.tar.gz [root @ localhost ~] # Wget http://dev.mysql.com/Downloads/MySQL-5.5/mysql-5.5.27.tar.gz Decompress [root @ localhost ~] # Cd/usr/local/[root @ localhost local] # tar xzvf mysql-5.5.27.tar.gz [root @ localhost local] # cd mysql-5.5.27 cmake run [root @ localhost mysql-5.5.27] # cmake. error: -- cocould NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH) CMake Error at cmake/readline. cmake: 82 (MESSAGE): Curses library not found. please install appropriate package, remove CMakeCache.txt and rerun cmake. on Debian/Ubuntu, packa Ge name is libncurses5-dev, on Redhat and derivates it is 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) -- inserting ing incomplete, errors occurred! Solution: [root @ localhost mysql-5.5.27] # rm CMakeCache.txt [root @ localhost mysql-5.5.27] # yum-y install ncurses-devel * re-cmake run [root @ localhost mysql-5.5.27] # cmake. there is still a Warning: Bison executable not found in PATH there is a Warning, it also solves it, the lack of Bison to install the [root @ localhost mysql-5.5.27] # yum install bison again, no error [root @ localhost mysql-5.5.27] # cmake. before compilation and installation, you can set the installation configuration option [root @ localhost mysql-5.5.27] #. /configure -- help according Select the option you need to set for help information. you can skip this step and follow the default setting # Start compilation and installation. the installation takes a little longer... [root @ localhost mysql-5.5.27] # make & make install complete the compilation and installation to enter the installation directory, change the ownership of the binary program to root, the ownership of the data directory to mysql User, updating the authorization table [root @ localhost mysql-5.5.27] # cd/usr/local/mysql [root @ localhost mysql] # chown-R root. [root @ localhost mysql] # chown-R mysql. [root @ localhost mysql] # chgrp-R mysql. [root @ localhost mysql] # scripts/mysql_install_db -- user = mysql initialization database [root @ Localhost mysql] #/usr/local/mysql/scripts/mysql_install_db -- user = mysql -- basedir =/usr/local/mysql -- datadir =/usr/local/mysql/data safe start mysql [root @ localhost mysql] #. /bin/mysqld_safe -- user = mysql disable mysql [root @ localhost mysql] #. /bin/mysqladmin-u root shutdown-p default password is empty for convenient calling, set a soft link for mysql [root @ localhost ~] # Ln-s/usr/local/mysql/bin/mysql/usr/bin/other settings: set the option file, copy the configuration file to/etc [root @ localhost mysql] # cp support-files/my-medium.cnf/etc/mysql. cnf is set to boot automatically [root @ localhost mysql] # cp support-files/mysql. server/etc/init. d/mysql [root @ localhost mysql] # chmod + x/etc/init. d/mysql [root @ localhost mysql] # chkconfig-add mysqld [root @ localhost mysql] # chkconfg mysqld on can now start and close the Mysql server through services [root @ localhos T ~] # Service mysql start [root @ localhost ~] # Service mysql shutdown Connection Server [root @ localhost ~] # 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. type '/C' to clear the buffer. mysql>... mysql> the prompt tells you that mysql is ready to enter the command for you. At this point, MySQL has been properly installed and can be used with mysql> QUIT reference URL: http:///database/201209/156148.html ; http:///database/201209/156150.html For more information about MySQL applications, see MySQL 5.5 Reference Manual. BitsCN.com

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.