Install MySQL 5.5 in Linux source code
This article describes how to install mysql5.5 in the source code. The system used is CentOS6.5.
1. Install the corresponding development environment
Yum install-y ncurses-devel
Yum install-y libaio
Yum install-y bison
Yum install-y gcc-c ++
Yum install-y openssl-devel
Ii. Install cmake
Cross-platform Compiler
# Tar xf cmake-2.8.8.tar.gz
# Cd cmake-2.8.8
#./Bootstrap
# Make
# Make install
You can also use yum or rpm for installation.
Yum install-y cmake
-------------------------------------- Split line --------------------------------------
Install MySQL in Ubuntu 14.04
MySQL authoritative guide (original book version 2nd) Clear Chinese scan PDF
Ubuntu 14.04 LTS install LNMP Nginx \ PHP5 (PHP-FPM) \ MySQL
Build a MySQL Master/Slave server in Ubuntu 14.04
Build a highly available distributed MySQL cluster using Ubuntu 12.04 LTS
Install MySQL5.6 and Python-MySQLdb in the source code of Ubuntu 12.04
MySQL-5.5.38 universal binary Installation
-------------------------------------- Split line --------------------------------------
3. Compile and install mysql-5.5.33
1. Compile and install
# Groupadd-r mysql
# Useradd-g mysql-r-d/mydata/data mysql
# Tar xf mysql-5.5.33.tar.gz
# Cd mysql-5.5.33
# Cmake. -DCMAKE_INSTALL_PREFIX =/usr/local/mysql-DMYSQL_DATADIR =/mydata/data-DSYSCONFDIR =/etc-region = 1-region = 1-region = 1-DWITH_READLINE = 1-DWITH_SSL = system-DWITH_ZLIB = system-DWITH_LIBWRAP = 0-DMYSQL_UNIX_ADDR =/tmp/mysql. sock-DDEFAULT_CHARSET = utf8-DDEFAULT_COLLATION = utf8_general_ci
# Make
# Make install
2. Change the owner of all mysql files to root and the group to mysql.
# Cd/usr/local/mysql
# Chown-R. mysql.
3. Copy the my-large.cnf in support-files to/etc/my. cnf (it is best to back up my. cnf in the actual production environment) and modify my. cnf
# Cp support-files/my-large.cnf/etc/my. cnf
# Vim/etc/my. cnf
Add datadir =/mydata/data
4. Manually initialize and copy mysql. server to/etc/rc. d/init. d/mysqld and add it to the service.
# Scripts/mysql_install_db -- user = mysql -- datadir =/mydata/data/
# Cp support-files/mysql. server/etc/rc. d/init. d/mysqld
# Chmod + x/etc/rc. d/init. d/mysqld
# Chkconfig -- add mysqld
# Vim/etc/profile. d/mysql. sh
Now, you can use mysql commands and services:
Start the service:
Mysql client command:
For more details, please continue to read the highlights on the next page: