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.