CentOS 6.5 Source Package installation MySQL

Source: Internet
Author: User

#源码包安装MySQL数据库 [[email protected]]# yum-y install gcc gcc-c++ autoconf automake zlib* libxml* ncurses-devel libmcrypt* li btool-ltdl-devel* make CMake Bison perl curl-devel
#安装MySQL [[email protected] cmake-3.0.2]# groupadd -r mysql[[email protected]  cmake-3.0.2]# useradd -r -g mysql -s /sbin/nologin mysql[[email  protected] cmake-3.0.2]# mkdir -p /data/mysql# Creating a database directory [[email protected]  cmake-3.0.2]# chown -r mysql:mysql /data/mysql[[email protected] cmake-3.0.2]#  mkdir -p /usr/local/mysql# creating the installation directory [[email protected] cmake-3.0.2]# cd /usr/ Local/src[[email protected] src]# tar zxvf mysql-5.6.21.tar.gz[[email protected]  src]# cd mysql-5.6.21[[email protected] mysql-5.6.21]# cmake -dcmake_ Install_prefix=/usr/local/mysql -dmysql_datadir=/data/mysql -dmysql_unix_addr=/data/mysql/mysql.sock  -ddefault_charset=utf8 -ddefault_collation=utf8_general_ci -dwith_myisam_storage_engine=1  -dwith_innobase_storage_enginE=1 -dwith_archive_storage_engine=1 -dwith_blackhole_storage_engine=1 -dwith_memory_storage_ engine=1 -dwith_readline=1 -denabled_local_infile=1 -dmysql_user=mysql -dmysql_tcp_port= 3306 -denable_downloads=1[[email protected] mysql-5.6.21]# make[[email protected]  mysql-5.6.21]# make install[[email protected] mysql-5.6.21]# rm -rf / Etc/my.cnf[[email protected] mysql-5.6.21]# cd /usr/local/mysql[[email protected]  mysql-5.6.21]# ./scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql -- Datadir=/data/mysql[[email protected] mysql-5.6.21]# ln -s /usr/local/mysql/my.cnf  /etc/my.cnf[[email protected] mysql-5.6.21]# cp ./support-files/mysql.server / etc/rc.d/init.d/mysqld[[email protected] mysql-5.6.21]# chmod 755 /etc/init.d/mysqld[ [email protected]  mysql-5.6.21]# chkconfig mysqld on[[email protected] mysql-5.6.21]# vim / etc/rc.d/init.d/mysqld basedir=/usr/local/mysql  #MySQL程序安装路径datadir =/data/mysql  #MySQl数据库存放目录 [[ email protected] mysql-5.6.21]# service mysqld start[[email protected]  mysql-5.6.21]# vim /etc/profile  #把mysql服务加入系统环境变量: Add the following line at the end export path= $PATH:/usr/local/ Mysql/bin[[email protected] mysql-5.6.21]# source /etc/profile[[email protected]  mysql-5.6.21]# mysqladmin -u root password  #设置Mysql密码


This article is from the "Wu Shanqiang" blog, make sure to keep this source http://shanqiangwu.blog.51cto.com/8067564/1650571

CentOS 6.5 Source Package installation MySQL

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.