Mysql rpm Installation
1. download.
Download http://dev.mysql.com/downloads/mirror.php here? Id = 402502.
2. install.
Download to local unzip:
Tar-xvf MySQL-5.5.12-1.rhel5.x86_64.tar
Install the following rpm
Rpm-ivh MySQL-devel-5.5.12-1.rhel5.x86_64.rpm
Rpm-ivh MySQL-shared-5.5.12-1.rhel5.x86_64.rpm
Rpm-ivh MySQL-client-5.5.12-1.rhel5.x86_64.rpm
Rpm-ivh MySQL-server-5.5.12-1.rhel5.x86_64.rpm
3. Configure users and user groups.
Groupadd mysql
Useradd mysql-g mysql
4. Configure mysql.
Cd/usr/share/mysql/
Cp my-medium.cnf/etc/my. cnf # Here I am only used to demonstrate the application.
5. Run mysql
Mysqld_safe &
6. Configure the mysql root User
Mysqladmin-uroot password 'Password'
7. Set remote users
Create user 'geewu' @ '%' identified by 'Password ';
Grant all on *. * TO 'gewu' @ '% ';
Mysql command line compilation
Groupadd mysql
Useradd-s/bin/false-g mysql-pmysql mysql
# Install mysql to home/work/local/mysql
./Configure -- prefix =/home/work/local/mysql \
-- With-unix-socket-path =/home/work/local/mysql/tmp/mysql. sock \
-- With-big-tables -- with-plugins = all -- with-client-ldflags = all-static -- with-mysqld-ldflags = all-static
Make; make install
1.-static 13%
-- With-client-ldflags =-all-static
-- With-mysqld-ldflags =-all-static
Static links increase performance by 13%
2.-pgcc 1%
CFLAGS = "-O3-mpentiumpro-mstack-align-double" CXX = gcc \
CXXFLAGS = "-O3-mpentiumpro-mstack-align-double \
-Felide-constructors-fno-exceptions-fno-rtti"
For Inter processors, use pgcc to improve performance by 1%
3. the Unix Socket 7.5%
-- With-unix-socket-path =/usr/local/mysql/tmp/mysql. sock
Using unix socket links improves performance by 7.5%, so mysql performance in windows is certainly inferior to that in unix
4. -- enable-Cycler
Allow Assembly mode (optimized performance)
Cd/home/work/local/mysql
Bin/mysql_install_db -- user = mysql // install the default database
Cp share/mysql/my-medium.cnf/etc/my. cnf // copy the configuration file (which may need to be modified as appropriate)
CP share/MySQL. Server/etc/init. d/mysqld // copy the MySQL Startup Script
Chmod 755/etc/init. d/mysqld // modify the MySQL STARTUP script permission. The execution permission is required.
Chkconfig -- add mysqld // Add MySQL Service
Chkconfig -- level 35 mysqld on // set the service to start at runtime Level 3 and 5
Service mysqld start // start the service