Compile and install mysql in Debain. 1. Make sure you are ready to install the binary file... # (if you provide your own files, be sure not to make the version wrong) wget http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.12.tar.gz/from/http://mysql.he.net/ # Cmake compile wget http://www.cmake.org/files/v2.8/cmake-2.8.4.tar.gz Wget http://ftp.gnu.org/gnu/bison/bison-2.4.3.tar.gz Apt-get install make // the network resource address is not found. Leave 2. install the cmake cd/usr/local/tar zxvf cmake-2.8.4.tar.gz // download the cmake file path cd cmake-2.8.4. /bootstrap make install3. install bison tar zxvf bison-2.4.3.tar.gz cd bison-2.4.3. /configure make install1.configure: error: no acceptable C compiler found in $ PATH cause: GCC compiler is not installed. solution: apt-get install gcc4 compile and install mysql # create a user groupadd mysql useradd-g mysql cd/usr/local tar zxvf .. /mysql-5.5.12.tar.gz // I put the binary file under/usr cd mysql-5.5.12 # compile the binary file cmake-DCMAKE_INSTALL_PREFIX =/usr/local/mysql \-DMYSQL_UNIX_ADDR =/tmp/mysql. sock \-DDEFAULT_CHARSET = utf8 \-DDEFAULT_COLLATION = utf8_general_ci \-DWITH_EXTRA_CHARSETS: STRING = utf8, gbk \-records = 1 \-records = 1 \-records = 1 \-DWITH_READLINE = 1 \-DENABLED_LOCAL_INFILE = 1 \-DMYSQL_DATADIR =/var/mysql/data \-DMYSQL_USER = mysql make // This step takes a long time (the package of this file contains cmakelists.txt) make install # modify user and permissions/usr/sbin/groupadd mysql/usr/sbin/useradd-g mysql mysqlchmod + w/usr/local/mysqlchown-R mysql: mysql/usr/local/mysqlmkdir-p/var/mysql/mkdir-p/var/mysql/data/mkdir-p/var/mysql/log/chown-R mysql: mysql/var/mysql/cd support-files/cp my-large.cnf/var/mysql/my. cnf (for debian, my. conf needs to be placed under/etc/mysql/) cp mysql. server/etc/init. d/mysqld2.FATAL ERROR: cocould not find mysqld (the command prompt is not too clear, that is, the mysqld command cannot be found) solution ln-sf/usr/local/mysql/bin/*/usr/bin3 fatal error: cocould not find errmsg. sys: the file cannot be accessed under a specific path. If you just copy the file, the same problem may occur below, because it depends on the/usr/local/mysql/share folder, I copied it directly, or create a soft connection solution cd/usr/share/mkdir mysqlcd mysql cp-a/usr/local/mysql/share /*. 4/usr/bin/mysqld: error while loading shared libraries: libaio. so.1: cannot open shared object file: No such file or directory when installing libaio-dev tips on the Internet to find the cause, it is said that there is No apt-get update, so the ignorant apt-get update FUCK is invalid. To write an article in detail, I am a linux apprentice, which indicates that the pressure is great to go to the following URL and follow the prompts to modify/etc/apt/sources. list http://packages.debian.org/zh-cn/lenny/i386/libaio-dev/download Install the apt-get install libaio-dev5 in apt-get update. 110518 15:09:27 [ERROR]/usr/local/mysql/bin/mysqld: unknown option '-- skip-bdb' solution vim/etc/mysql/my. cnf comment out the skip-bdb line cary: /usr/local/mysql # scripts/mysql_install_db -- datadir =/var/mysql/data/-- basedir =/usr/local/mysql -- user = mysql start database/etc/init. d/mysqld start this is the exception information I have simulated/etc/init. d/mysqld: line 276: cd:/usr/local/mysq1l: No such file or Directory solution vim/etc/mysql/my. in cnf, the configuration parameters of mysqld must be consistent with the configuration parameters you installed above, as shown in my. [mysqld]... change the basedir =/usr/local/mysq1l parameter to/usr/local/mysql configured above to change the administrator password mysqladmin-uroot password '123' Starting MySQL .... the server quit without updating PID file (/var/run/mysqld. pid ). failed! Solution: pkill-f mysql rm/var/run/mysql/* restart mysql. If you download the compiled file, you do not need to compile Cmake. You can skip this step to create remote user logon. no ?? Vim/etc/mysql/my. cnf comment out bind-address 127.0.0.1