CentOS6.5 Compiling and installing MySQL5.5

Source: Internet
Author: User

Install dependency Package: yum -y install gcc* gcc-c++* autoconf* automake* zlib* libxml*  ncurses-devel* libgcrypt* libtool* installation cmake:[[email protected] usr]# wget  http://www.cmake.org/files/v2.8/cmake-2.8.12.tar.gz[[email protected] usr]# tar xzvf  Cmake-2.8.12.tar.gz [[email protected] usr]# cd cmake-2.8.12[[email protected]  cmake-2.8.12]# ./bootstrap [[email protected] cmake-2.8.12]# gmake [[email  protected] cmake-2.8.12]# gmake install adding MySQL Users and user groups:[[email protected]  cmake-2.8.12]# cd ~[[email protected] ~]# groupadd mysql [[email  Protected] ~]# useradd -g mysql mysql Create the MySQL installation directory and authorize: [[email protected] ~]#  mkdir /usr/local/mysql[[email protected] ~]# mkdir /usr/local/mysql/data[[email  protected] ~]#&nbsP;chown -r mysql:mysql /usr/local/mysql download MySQL source code: [[Email protected] ~]# wget  http://mirrors.sohu.com/mysql/mysql-5.5/mysql-5.5.45.tar.gz[[email protected] ~]# tar  xzvf mysql-5.5.45.tar.gz [[email protected] ~]# cd mysql-5.5.45 configuring MySQL compilation parameters : [[email protected] ~] #cmake  -dcmake_install_prefix=/usr/local/mysql -dmysql_datadir=/usr/ Local/mysql/data -dwith_innobase_storage_engine=1 -dwith_partition_storage_engine=1 -dwith_ perfschema_storage_engine=1 -dwith_myisam_storage_engine=1 -dmysql_unix_addr=/usr/local/mysql/tmp/ mysql.sock -dmysql_tcp_port=3306 -denabled_local_infile=1 -dwith_extra_charsets=all - Ddefault_charset=utf8 -ddefault_collation=utf8_general_ci -dwith_ssl=yes to compile and install:[[email  Protected] ~]# make && make install Configuration my.cnf:[[email protected]  support-files]# cd /usr/local/mysql/support-files[[email protected] support-files]# cp my-medium.cnf /etc/my.cnf[[ email protected] support-files]# vim /etc/my.cnf[mysqld]basedir=/usr/local/mysqldatadir=/ usr/local/mysql/datasocket=/usr/local/mysql/tmp/mysql.sockcharacter-set-server=utf8max_connections= 300default-storage-engine=innodbcollation-server=utf8_binsql_mode=no_engine_substitution,strict_trans_tables[ client]port=3306default-character-set=utf8[mysql]no-auto-rehashdefault-character-set=utf8[safe_mysqld]  Err-log=/var/log/mysqld.log pid-file=/var/lib/mysql/mysql.pid Initializing Database:[[email protected]  Support-files]# /usr/local/mysql/scripts/mysql_install_db --defaults-file=/etc/my.cnf --basedir =/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql set boot from  [[email protected]  support-files]# cp mysql.server /etc/init.d/mysqld[[email protected]  support-files]# chmod +x /etc/init.d/mysqld[[email protected] support-files]# chkconfig --add mysqld[[email  Protected] support-files]# chkconfig --level 345 mysqld on Start Service:[[email  Protected] support-files]# service mysqld start Set Password:[[email protected]  Support-files]# /usr/local/mysql/bin/mysqladmin password [new-password] Set a soft link:[[email  Protected] support-files]# ln -s /usr/local/mysql/bin/mysql /usr/bin/mysql Login mysql:[[ Email protected] support-files]# mysql -uroot -p


CentOS6.5 Compiling and installing MySQL5.5

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.