Install mysql 5.5 source code

Source: Internet
Author: User
Document directory
  • 3.1 add user groups and users
  • 3.2 download mysql source code
  • 3.3 change permissions
  • 3.4 change configuration parameters
1. Install gcc

Yum install gcc
2. Install cmake

Wget http://www.cmake.org/files/v2.8/cmake-2.8.10.1.tar.gz
Tar xzvf cmake-2.8.10.1.tar.gz
Cd cmake-2.8.10.1
./Bootstrap
Make
Make install
Cmake-version

3. Install mysql3.1 to add user groups and users

Groupadd mysql

useradd -r -g mysql mysql

3.2 download mysql source code

Wget http: // 10.10.4.8/download/30352191/38131622/1/gz/190/9/1349709875902_9/mysql-5.5.28.tar.gz
Tar xzvf mysql-5.5.28.tar.gz

Cd mysql-5.5.28

Cmake ./

// If re-compiled, clear the old file and cache make cleanrm-f CMakeCache.txt rm-rf/etc/my. cnf

Make & make install

3.3 change permissions

Cd/usr/local/mysql

chown -R root:mysql .

Mkdir/var/mysql/data

Cd/var/mysql/data

chown -R mysql:mysql .

3.4 change configuration parameters

Cp/usr/local/mysql/support-files/my-large.cnf/usr/local/mysql/my. cnf

Cp/usr/local/mysql/support-files/mysql. server
/Etc/init. d/mysqld

Chmod
+ X/etc/init. d/mysqld

Vi
/Etc/init. d/mysqld

Basedir =/usr/local/mysql

Datadir =/var/mysql/data

3.5 initialize the database

/Usr/local/mysql/scripts/mysql_install_db -- user = mysql -- basedir =/usr/local/mysql -- datadir =/var/mysql/data

3.6 set Mysql Service Startup // set the environment variable and change the PATH Parameter
vi /root/.bash_profile    PATH=$PATH:$HOME/bin:/usr/local/mysql/bin:/usr/local/mysql/libsource /root/.bash_profile

chkconfig --add mysqldchkconfig mysqld on service mysqld start
3.7 SET Password

Set Password:/usr/local/mysql/bin/mysqladmin
Password [new-password]

4. Other parts

The server quit without updating PID file (/var/myql/data/localhost. localdomain. pid)

View the Error Log File: localhost. localdomain. err under/var/mysql/data/, and revise the error items one by one.

Ps-ef | grep
Mysqld detects a zombie process, uses kill-9 processid, and then restarts the service.

Yum
Install libmysqlclient. so.15 // The error code returned. If this library is missing, install one.

5.
Grant remote login permission

GRANT
All privileges on *. * TO 'root' @ '%' identified by 'pwd' with grant option;
Flush privileges;

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.