Compile the mysql5 code:./configure / --prefix=/usr/local/mysql / --localstatedir=/usr/local/mysql/data / --with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock / --with-extra-charsets=all / --with-charset=utf8 / --with-client-ldflags=-all-static / --with-mysqld-ldflags=-all-static / --with-plugins=all / --with-pthread / --enable-thread-safe-client groupadd mysqluseradd -g mysql mysqlcp support-files/my-medium.cnf /etc/my.cnf Add User = MySQL code in my. CNF: cd /usr/local/mysqlbin/mysql_install_db --user=mysqlchown -R root . ; chown -R mysql data ;chgrp -R mysql .bin/mysqld_safe --user=mysql &mysqladmin -uroot password 'new-password' Start MYSQL: code: /usr/local/mysql/bin/mysqld_safe & Close MYSQL: code: /usr/local/mysql/bin/mysqladmin shutdown Code:cp ./support-files/mysql.server /etc/rc.d/init.d/mysqld You can use server mysqld restart to start Precautions for installing MySQL In Debian -- InnoDB If MySQL is compiled and installed from the source code, no InnoDB engine is installed by default. therefore, in configure, add -- With-plugins = all (or Max) to support InnoDB. in MySQL, you can run the show engines command to view the storage engines supported by the current MySQL server. Http://www.mysqlperformanceblog.com/...iled-mysql-51/ For multithreading support, you only need to select the -- with-pthread and -- enable-thread-safe-client options. The first option can indicate the use of POSIX Threads (the Unix compilation method may be somewhat different, because the Unix kernel thread working mode is significantly different from the Linux thread working mode, especially FreeBSD ). My-small.cnf minimum configuration installation, memory <= 64 m, minimum data My-large.cnf memory = 512 m My-medium.cnf 32 m <memory <64 m, or memory 128 M, but the database and web server public memory My-huge.cnf 1G <memory <2g, the server mainly runs MySQL My-innodb-heavy-4G.cnf Max configuration installation with at least 4 GB memory Code:delete from mysql.user where User='';delete from mysql.user where Host='127.0.0.1';delete from mysql.user where Host='localhost.localdomain';update user set Host='%'; Mysql operation: View mysql status: /Etc/rc. d/init. d/mysqld status Enable mysql Service mysqld start |