LAMP, Lnmp combat four build MySQL (continuous update)

Source: Internet
Author: User
Tags chmod

LAMP, Lnmp combat four build MySQL
Description: Server 192.168.2.32
Database version mysql5.5.32
CMake version 2.8.8
Yum install-y gcc gcc-c++ gcc-g77 autoconf automake zlib* fiex* libxml* ncurses-devel libmcrypt* libtool-ltdl-devel*//Installation Compilation Environment GCC
Yum install-y mysql-devel//Installation Msyqlku
Yum Install lrzsz-y//installation upload, download tool
Mkdir/home/www/tools-p//Create a directory on 32
cd/home/www/tools///Enter directory
RZ uploads cmake-2.8.8.tar.gz and mysql-5.5.32.tar.gz
Tar XF cmake-2.8.8.tar.gz//Unzip make
CD cmake-2.8.8//Enter the CMake directory
./configure && gmake && gmake Install//compile CMake
Cd.. Exit CMake Directory
Useradd mysql-s/sbin/nologin-m//create user belongs to MySQL Group
Tar XF mysql-5.5.32.tar.gz//unzip MySQL
CD mysql-5.5.32//Enter MySQL directory

Enter the following and return to
CMake. -dcmake_install_prefix=/application/mysql-5.5.32 \
-dmysql_datadir=/application/mysql-5.5.32/data \
-dmysql_unix_addr=/application/mysql-5.5.32/tmp/mysql.sock \
-DEXTRA_CHARSETS=GBK,GB2312,UTF8,ASCII \
-denabled_local_infile=on \
-dwith_innobase_storage_engine=1 \
-dwith_federated_storage_engine=1 \
-dwith_blackhole_storage_engine=1 \
-dwithout_example_storage_engine=1 \
-dwithout_partition_storage_engine=1 \
-dwith_fast_mutexes=1 \
-dwith_zlib=bundled \
-denabled_local_infile=1 \
-dwith_readline=1 \
-dwith_embedded_server=1 \
-dwith_debug=0

Make && make install//install MySQL

Ln-s/application/mysql-5.5.32//application/mysql//Create soft Connect
CD://exit MySQL directory
CP mysql-5.5.32/support-files/ MY-SMALL.CNF/ETC/MY.CNF
Press Y
Echo ' export path=/application/mysql/bin: $PATH ' >>/etc/profile//Edit environment variable
Source/etc/profile//Immediate effect
Chown-r mysql.mysql/application/mysql/data///user empowerment
Chmod-r 1777/tmp///Folder Empowerment
CD/ application/mysql/scripts///Enter the initialization directory
./mysql_install_db--basedir=/application/mysql/--datadir=/application/ mysql/data/--user=mysql//Initialize MySQL
cd/home/www/tools/mysql-5.5.32//Enter directory
CP support-files/mysql.server/etc/ INIT.D/MYSQLD//Create power-on self-boot file
chmod +x/etc/init.d/mysqld//Folder empowerment
/etc/init.d/mysqld start//start MySQL service
/ application/mysql//bin/mysqladmin-u root password ' oldboy123 '//Add password
mysql-uroot-poldboy123//Enter MySQL
Select User,host from Mysql.user; See if there is a blank user
Grant all privileges on test.* to ' root ' @ ' 192.168.% ' identified by ' oldboy123 ';//configure remote Access
Quit//Exit mysql< Br>chkconfig mysqld on//Set boot start

LAMP, Lnmp combat four build MySQL (continuous update)

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.