#make && make Install
2), add MySQL user
Groupadd MySQL
Useradd--shell/sbin/nologin-g MySQL MySQL
3), install MySQL
#tar ZXVF mysql-5.5.14.tar.gz
#cd mysql-5.5.14
#cmake \
-dcmake_install_prefix=/usr/local/mysql \
-dmysql_datadir=/usr/local/data/mysql \
-ddefault_charset=utf8 \
-DDEFAULT_COLLATION=UTF8_GENERAL_CI \
-dextra_charsets=all \
-dwith_myisam_storage_engine=1 \
-dwith_innobase_storage_engine=1 \
-dwith_readline=1 \
-denabled_local_infile=1 \
-dmysql_tcp_port=3306
#make && make Install
4), change the installation folder permissions
#chown-R mysql:mysql/usr/local/mysql/
#chown-R Mysql:mysql/usr/local/data/mysql
5), initialization of the words
#sh scripts/mysql_install_db--basedir=/usr/local/mysql/--datadir=/usr/local/data/mysql--user=mysql
6), copy MySQL configuration file, generate startup script
#cp support-files/my-medium.cnf/etc/my.cnf
#cp Support-files/mysql.server/etc/init.d/mysqld
7), set from start
#chmod 755/etc/init.d/mysqld
#chkconfig mysqld on
8), set the environment variable
#nano/etc/profile
Add the following content
Export Path=/usr/local/mysql/bin: $PATH
Alias mysql_start= "Mysqld_safe &"
Alias mysql_stop= "Mysqladmin–u root-p shutdown"
4. Start test
#service mysqld Start
#/usr/local/mysql/bin/mysql-uroot–p
5, Password and security configuration
#/usr/mysql/bin/mysql_secure_installation
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.