Compile and install lamp installation MySQL and management

Source: Internet
Author: User
Tags check character

First, Installation introduction
User name: MySQL
Installation directory:/usr/local/mysql-5.5
Database directory:/data/mysql/data
SOURCE Bundle: mysql-5.5.28.tar.gz
Second, installation preparation
Add user

Create the desired directory

Install the required files or programs for compiling

Download source Package (http://sourceforge.net/projects/mysql.mirror/files/MySQL%205.5.28/)

wget http://ncu.dl.sourceforge.net/project/mysql.mirror/MySQL%205.5.28/mysql-5.5.28.tar.gz

Third, compile and install

Cd
Tar xzvf mysql-5.5.28.tar.gzcd mysql-5.5.28cmake-dmysql_user=mysql-dcmake_install_prefix=/usr/local/mysql5.5- Dinstall_datadir=/data/mysql/data-dmysql_unix_addr=/tmp/mysqld.sock-ddefault_charset=utf8

Parameter description:
-dcmake_install_prefix=/usr/local/mysql//installation directory
-dmysql_datadir=/usr/local/mysql/data//Database storage directory
-dwith_myisam_storage_engine=1//install MYISAM storage Engine
-dwith_innobase_storage_engine=1//install InnoDB storage Engine
-dwith_archive_storage_engine=1//install ARCHIVE storage Engine
-dwith_blackhole_storage_engine=1//install Blackhole storage Engine
-denabled_local_infile=1//Allow import of data from local
-ddefault_charset=utf8//using UTF8 characters
-DDEFAULT_COLLATION=UTF8_GENERAL_CI//Check character
-dextra_charsets=all//Install all extended character sets
-dmysql_tcp_port=3306//mysql Listening Port
-dmysql_user=mysql//mysql User Name
Other parameters:
-dwith-embedded_server=1//compiled into EMBEDDED MySQL library (LIBMYSQLD.A)
-dsysconfdir=/etc//mysql Matching file
-dmysql_unix_addr=/tmp/mysqld.sock//unix Socket file path
-dwith_readline=1//shortcut key function
-dwith_ssl=yes//ssl
-dwith_memory_storage_engine=1//install memory storage engine
-dwith_federated_storage_engine=1//install frderated storage Engine
-dwith_partition_storage_engine=1//Install database partition
-dinstall_plugindir=/usr/local/mysql/plugin//plugin file and configuration path

Make && make Installchown-r mysql:mysql/usr/local/mysql5.5/mv/root/mysql-5.5.28/support-files/my-large.cnf /etc/my.cnfmv/root/mysql-5.5.28/support-files/mysql.server/etc/init.d/mysqldchmod A+x/etc/init.d/mysqld

Set boot up

Setting environment variables

echo "Export path=/usr/local/mysql5.5/bin/: $PATH" >>/etc/profilesource/etc/profile/usr/local/mysql5.5/ scripts/mysql_install_db--user=mysql--defaults-file=/etc/my.cnf--basedir=/usr/local/mysql5.5--datadir=/data/ Mysql/data

Modify the MySQL configuration file

Create MySQL Administrator

To connect to a database:

Mysql-u root-p

Compile and install lamp installation MySQL and management

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.