Centos 5.9 install mysql 5.5.31 install mysql in linux, there will be a variety of dependencies, install mysql in centos with various dependencies [root @ localhost] # tar xzvf cmake-2.8.4.tar.gz [root @ localhost src] # cd cmake-2.8.4 [root @ localhost cmake-2.8.4] #. /configure 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. You can 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.4] #. /configure C compiler on this system is: cc 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. [Root @ localhost ~] # Yum install gcc-c ++ repeat the operation above [root @ localhost cmake-2.8.4] #. /configue [root @ localhost cmake-2.8.4] # make [root @ localhost cmake-2.8.4] # make install start official installation Mysql add mysql user and user group [root @ localhost ~] # Groupadd mysql [root @ localhost ~] # Useradd-r-g mysql mysqldownload mysql's source code package mysql-5.5.31.tar.gz [root @ localhost ~] # Tar xzvf mysql-5.5.31.tar.gz [root @ localhost ~] # Cd mysql-5.5.31 cmake run [root @ localhost mysql-5.5.31] # cmake. -DCMAKE_INSTALL_PREFIX =/usr/local/mysql-connector =/usr/local/mysql/data-DDEFAULT_CHARSET = utf8-DDEFAULT_COLLATION = runtime -- Running cmake version 2.8.10.2 -- MySQL 5.5.31 -- Packaging: mysql-5.5.31-Linux-x86_64 -- cocould NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH) CMake Error at cmake/readline. cmake: 83 (MESSAGE): Curses library not found. please install appropriate package, remove CMakeCache.txt and rerun cmake. on Debian/Ubuntu, package name is libncurses5-dev, on Redhat and derivates it is ncurses-devel.Call Stack (most recent call first): cmake/readline. cmake: 127 (FIND_CURSES) cmake/readline. cmake: 217 (MYSQL_USE_BUNDLED_LIBEDIT) CMakeLists.txt: 269 (MYSQL_CHECK_READLINE) -- inserting ing incompl Ete, errors occurred! The Curses package is missing. Solution: remove CMakeCache.txt and rerun cmake. on Debian/Ubuntu, package name is libncurses5-dev, on Redhat and derivates it is ncurses-devel. to install ncurses-devel [root @ localhost mysql-5.5.31] # yum install ncurses-devel in CentOS, run [root @ localhost mysql-5.5.31] # cmake again. -DCMAKE_INSTALL_PREFIX =/usr/local/mysql-DMYSQL_DATADIR =/usr/local/mysql/data-DDEFAULT_CHARSET = utf8-DDEFAULT_COL LATION = utf8_general_ci ..................................... ............................... -- specify Ming Test HAVE_PEERCRED-SuccessWarning: Bison executable not found in PATH -- inserting ing done -- Generating done -- Build files have been written to:/root/mysql-5.5.31 has a warning, if Bison is missing, install [root @ localhost mysql-5.5.31] # yum install bison to delete cmakecache.txt and re-Execute cmake. Next start to compile and install, time is a little longer, you can do something else to see financial news [root @ localhost mysql-5.5.31] # make & make install modify directory permissions [root @ localhost ~] # Cd/usr/local/mysql [root @ localhost mysql] # chown-R root: mysql. [root @ localhost mysql] # chown-R mysql: mysql data creates a table for the system database [root @ localhost scripts] #. /mysql_install_db -- user = mysql -- basedir =/usr/local/mysql -- datadir =/usr/local/mysql/data cp configuration file cp/usr/local/mysql/support-files my-medium.cnf/etc/my. cnf starts mysql/usr/local/mysql/bin/mysqld_safe -- user = mysql & modifies the environment variable [root @ localhost ~] # Vi. bash_profile #. bash_profile # Get the aliases and functionsif [-f ~ /. Bashrc]; then .~ /. Bashrcfi # User specific environment and startup programs PATH = $ PATH: $ HOME/bin: /usr/local/mysql/bin/export PATHunset USERNAME. For example, it is very convenient to add a mysql path. In summary, it is very convenient to install centos because yum has been installed, when the dependency is missing, the system automatically downloads and installs it.