installation, optimization and security settings for MySQL 5.0.x under CentOS

Source: Internet
Author: User
Tags gz file centos

Download page: http://dev.mysql.com/downloads/mysql/5.0.html#downloads

To the bottom of the page, find source downloads, this is the source version, download the 1th tarball

Groupadd MySQL

Create a new user group named MySQL

useradd-g MySQL MySQL

Create a new user named MySQL under the MySQL user group

Gunzip < mysql-version.tar.gz | TAR-XVF-

Unzip the. gz file that you downloaded

CD mysql-version

Enter the unpacked directory

cflags= "-O3-MCPU=PENTIUM4" CXX=GCC cxxflags= "-o3-march=pentium4-felide-constructors-fno-exceptions-fno-rtti". Configure--prefix=/home/mysql/--without-debug--with-unix-socket-path=/home/mysql/tmp/mysql.sock-- With-client-ldflags=-all-static--with-mysqld-ldflags=-all-static--enable-assembler--WITH-EXTRA-CHARSETS=GBK, Gb2312,utf8--without-innodb--without-isam--with-pthread--enable-thread-safe-client

Configure MySQL

Related parameters for GCC:

-O3 \

-O

-o1

Optimization. For large functions, optimizing compilation takes up a little more time and considerable memory.

When you do not use the '-o ' option, the goal of the compiler is to reduce the overhead of the compilation so that the results of the compilation can be debugged. The statement is independent: If you abort the program with a breakpoint between two statements, you can reassign any variable, or point the program counter to another statement in the function body, and from the source program Get exactly the results you expect.

When you do not use the '-o ' option, only variables that declare a register are assigned to use registers. The results of the compilation are a little less than the PCC without the '-o ' option.

With the '-o ' option, the compiler attempts to reduce the size and execution time of the target code.

If the '-o ' option is specified, the '-fthread-jumps ' and '-fdefer-pop ' options will be opened. On machines with delay slot, the '-fdelayed-branch ' option will be opened. Even if no frame pointer pointer) also supports debugging machines, the '-fomit-frame-pointer ' option will be opened. Other options may also be turned on on some machines.

-o2

More optimization. In addition to the optimization options involved in space and speed switching, perform almost all of the optimization work. For example, do not cycle expand (loop unrolling) and function inline (inlining). Compared to the-o option, this option increases compilation time and results in the running of the generated code.

-o3

Optimized for more. In addition to opening the-O2, it also opens the-finline-functions option.

-o0

Not optimized.

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.