MySQL DBA system learning (1) MySQL versions compile installation

Source: Internet
Author: User
Tags dba mkdir php and versions mysql database automake

MySQL is a relational database management system, developed by the MySQL AB Company in Sweden and currently belongs to Oracle Company. MySQL is a relational database management system in which the associated database keeps data in different tables rather than putting all the data in a large warehouse, which increases speed and improves flexibility. MySQL's SQL language is the most common standardized language used to access databases. MySQL software uses a dual licensing policy (this term "authorization policy"), it is divided into community and commercial version, because of its small size, speed, the overall cost of ownership, especially the characteristics of open source, the general development of small and medium-sized Web site to choose MySQL as a website database. Thanks to the performance of its community edition, the combination of PHP and Apache can make a good development environment.

One, MySQL features

Simple

Efficient

Reliable

Second, the application of MySQL scenario

Web Site System

Logging System

Data Warehouse System

Embedded system

Third, the MySQL database compilation installation

Compiled versions are: mysql-5.1.70,mysql-5.5.15

1, mysql-5.1.70 compilation

Dependent Packages:

Libtermcap

Libtermcap-devel

Imake

Autoconf

Automake

Libtool

M4

Libstdc++-devel

Gcc-c++

Zlib-devel

Ncurses-devel

Compile and install MySQL5.1.70

[Root@test4 ~]# yum install libtermcap libtermcap-devel imake autoconf automake Libtool-M4

Libstdc++-devel gcc-c++ Zlib-devel Ncurses-devel

[Root@test4 ~]# useradd-m-s/sbin/nologin MySQL

[Root@test4 ~]# Mkdir/usr/local/mysql

[Root@test4 ~]# Mkdir/mysql/data-p

[Root@test4 ~]# tar zxvf mysql-5.1.70.tar.gz

[Root@test4 mysql-5.1.70]#./configure--prefix=/usr/local/mysql \ mysql installation directory

--datadir=/mysql/data \

--enable-assembler \

--with-client-ldflags=-all-static\
--WITH-UNIX-SOCKET-PATH=/TMP \
--with-charset=utf8 \

--enable-thread-safe-client \

--with-pthread\
--without-debug \

--with-big-tables \

--enable-community-features\
--enable-profiling \

--enable-local-infile \

--with-fast-mutexes\

--with-plugins=partition,federated,ndbcluster,innobase,csv,blackhole,myisam,innodb_plugin

[Root@test4 mysql-5.1.70]# make

[Root@test4 mysql-5.1.70]# Strip Sql/mysqld

[Root@test4 mysql-5.1.70]# make install

[Root@test4 mysql-5.1.70]# CP support-files/my-medium.cnf/etc/my.cnf

The parameters in the #/etc/my.cnf file vary according to the actual situation

[Root@test4 mysql-5.1.70]# CP Support-files/mysql.server/etc/init.d/mysqld

The "DataDir" parameter value in the #修改/etc/init.d/mysqld file is/mysql/data (datadir=/mysql/data)

[Root@test4 mysql-5.1.70]# chmod u+x/etc/init.d/mysqld

[Root@test4 mysql-5.1.70]# chkconfig--add mysqld (performed without this service in chkconfig)

[Root@test4 mysql-5.1.70]#/usr/local/mysql/bin/mysql_install_db--user=mysql--datadir=/mysql/data

[Root@test4 mysql-5.1.70]# chown-r mysql.mysql/data/mysql/

[Root@test4 mysql-5.1.70]# Service mysqld start

[Root@test4 mysql-5.1.70]#/usr/local/mysql/bin/mysqladmin-u root password ' 123456 '

[Root@test4 mysql-5.1.70]# echo "path=\"/usr/local/mysql/bin:/data/bin/:\ $PATH \ "" >>/etc/profile

[Root@test4 mysql-5.1.70]# exportpath= "/usr/local/mysql/bin:/data/bin/: $PATH"

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.