MySQL Installation record documentation

Source: Internet
Author: User
Tags readline

1. Download mysql

http://mysql.ntu.edu.tw/pub/MySQL/Downloads/

selected the 5.1.70 version

Mysql-5.1.70.tar.gz

2. decompression and installation

(1) Create a user

Useradd-s/sbin/nologin-m MySQL

(2) decompression

Tar zxf mysql-5.1.70.tar.gz

(3) compiling

CD mysql-5.1.70

./configure--prefix=/application/mysq--with-unix-socket-path=/application/mysql/tmp/mysql.sock--localstatedi R=/application/mysql/data

--enable-assembler

--with-mysqld-ldflags=-all-static

--with-client-ldflags=-all-static

--enable-thread-safe-client

--with-mysqld-user=mysql

--with-big-tables

--without-debug

--with-pthread

--with-extra-charsets=all

--with-charset=utf8

--with-readline

--with-ssl

--with-embedded-server

--enable-local-infile–

-with-plugins=partition,innobase

(4) installation

Make

Make install

Parameter description:

--prefix=/application/mysql Installation Path

--with-unix-socket-path=/application/mysql/tmp/mysql.sock specifying the MySQL socket file storage directory

--localstatedir=/application/mysql/data setting the MySQL data file storage location

--enable-assembler allows for practical assembly mode (optimized performance)

--with-mysqld-ldflags=-all-static Server uses a static library (optimizes performance)

--with-client-ldflags=-all-static Client uses a static library (optimizes performance)

--enable-thread-safe-client to compile the client in a threaded fashion

--with-mysqld-user=mysql Specifies the system user that MySQL is running

--with-big-table support for large tables over 4GB

--without-debug using non- debug mode

--with-pthread forcing the use of Pthread Line Library compilation

--with-extra-charsets=complex Specifies the installed character set, if all is the installation of all character sets

--with-charset=utf8 Default character set is UTF8

--with-readline Display installation of compilation issues

--with-ssl Let the Configure script to detect the location of the SSL library

--with-embedded-server build embedded services?

--enable-local-infile allow local data files to be loaded

--with-plugins=partition,innobase supports partition table function,innobase storage engine (InnoDB)

3. Configuration Start-up

CP support-files/my-small.cnf/etc/my.cnf Copy configuration file

cd/application/mysql/; mkdir Data build date directory

Chown-r mysql/application/mysql/ Change the directory owner

/application/mysql/bin/mysql_install_db--basedir=/application/mysql--datadir=/application/mysql/data/--user= MySQL initialize database file

/application/mysql/bin/mysqld_safe & start MySQL

Echo ' Exportpath=/application/mysql/bin: $PATH ' >>/etc/profile

Source/etc/profile Configuring environment variables

Cp/home/tool/mysql-5.1.70/support-files/mysql.server/etc/init.d/mysqld Copy boot file

chmod 755/etc/init.d/mysqld giving execute permission

Chkconfig--add mysqld

Chkconfig--level 3 MySQL on add Startup item and set boot start

mysqladmin-u root password ' 123 ' change The password of the database root user

This article is from the "Ancient Star" blog, please be sure to keep this source http://jjsly.blog.51cto.com/704083/1591792

MySQL Installation record documentation

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.