CentOS Install MySQL 5.5.12

Source: Internet
Author: User

1. Installing the gcc-c++ gcc make CMake compiler

2. Installing ncurses

3. Add a user group

    Groupadd MySQL      useradd-r-g MySQL MySQL  

4. Installation

    TAR-ZXVF mysql-5.5.12.tar.gz     cd mysql-5.5.12    cmake-dcmake_install_prefix=/usr/local/mysql-dmysql_unix_ Addr=/data/mysql/mysql.sock-ddefault_charset=utf8-ddefault_collation=utf8_general_ci-dwith_extra_charsets: String=utf8,gbk-dwith_myisam_storage_engine=1-dwith_innobase_storage_engine=1-dwith_memory_storage_engine=1- dwith_readline=1-denabled_local_infile=1-dmysql_datadir=/data/mysql-dmysql_user=mysql-dmysql_tcp_port=3306 Make make      install  

5. Configuration

CP support-files/my-medium.cnf/etc/my.cnf     #如果你的机器的内存教大, can copy myhuge.cnf file chmod 755 Scripts/mysql_install_ dbscripts/mysql_install_db  --user=mysql  --basedir=/usr/local/mysql--datadir=/data/mysql/    # # Initialize database cp support-files/mysql.server/etc/init.d/mysql   #设置开机启动mysqlchmod 755/etc/init.d/mysqlchkconfig MySQL on     #开机启动echo ' export path=/usr/local/mysql/bin: $PATH ' >>/etc/profile        #将mysql的安装路径加入PATH中, Easy to start MySQL (restart in effect)/etc/init.d/mysql start     #启动mysql

6. You can see if MySQL is started in the process

Ps-le | grep mysqld

NETSTAT-TUNPL | grep:3306

7. Set the MySQL password

  

/usr/local/mysql/bin/mysql-u Rootset PASSWORD for ' root ' @ ' localhost ' =password (' 123456 ');

Reference Document: http://blog.csdn.net/westmaniac/article/details/6535000

Http://www.linuxidc.com/Linux/2011-12/49046.htm

Related Article

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.