How to install and configure MySQL5.1.54 source code in CentOS6.364

Source: Internet
Author: User
This is the source code package installation. Installation environment: CentOS6.364 #1: Install the dependency package first (otherwise, an error will be reported during configuration !) Yum-yinstallncurses * libtermc

This is the source code package installation. Installation environment: CentOS 6.3 64-bit 1: Install the dependency package first (otherwise, an error will be reported during configuration !) Yum-y install ncurses * libtermc

This is the source code package installation.

Installation environment: CentOS 6.3 64-bit

1. Install the dependency package first (otherwise, an error will be reported during configuration !)

Yum-y install ncurses * libtermcap *

Create a mysql user

[Root @ client ~] # Useradd-s/sbin/nologin mysql

Ii. Obtain the mysql source code package

[Root @ client ~] # Wget

Iii. Install mysql
[Root @ client ~] # Tar zxvf mysql-5.1.54.tar.gz
[Root @ client ~] # Cd mysql-5.1.54
[Root @ client mysql-5.1.54] #./configure -- prefix =/usr/local/mysql // specify the mysql installation path
-- Localstatedir =/data/mysql_db // specify the path for storing database files
-- With-mysqld-ldflags =-all-static // compile the server in static mode
-- With-client-ldflags =-all-static // compile the client statically
-- With-extra-charsets = utf8, gbk // Add utf8, gbk character set
-- With-plugins = innobase, myisam // Add a mysql storage engine
-- With-server-suffix =-community // Add a suffix to the string of the mysqld version
-- With-unix-socket-path =/usr/local/mysql/sock/mysql. sock
-- Enable-thread-safe-client // compile the client in thread mode to improve performance
-- Enable-javaser // use assembly to improve performance
-- Enable-profiling // enable the profile function
-- Without-embedded-server // remove embedded
-- Without-debug // remove the debug mode to improve performance
-- Without-example // remove the example mode to improve performance
[Root @ client mysql-5.1.54] # make & make install // compile and install

[Root @ client mysql-5.1.54] # cp support-files/my-medium.cnf/etc/my. cnf // copy the mysql configuration file

[Root @ client mysql-5.1.54] # cp support-files/mysql. server. sh/etc/init. d/mysqld // generate the mysql STARTUP script.

[Root @ client mysql-5.1.54] # chmod + x/etc/init. d/mysql // grant the script execution permission

[Root @ client mysql-5.1.54] # chown-R mysql: mysql/usr/local/mysql // modify directory owner
[Root @ client mysql-5.1.54] #/usr/local/mysql/bin/mysql_install_db -- user = mysql & // initialize mysql
[Root @ client mysql-5.1.54] # services mysqld start // start mysql
[Root @ client mysql-5.1.54] # mysqladmin-uroot password 123456 // set the mysql administrator password
[Root @ client mysql-5.1.54] # echo "export PATH = $ PATH:/usr/local/mysql/bin">/etc/profile // Add Environment Variables
[Root @ client mysql-5.1.54] # source/etc/profile // update Environment Variables

So far, mysql has been installed !!!

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.