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 !!!