One, the installation of MySQL:
1. Download mysql, you can download MySQL software via http://mirrors.sohu.com/.
wget http://mirrors.sohu.com/mysql/MySQL-5.1/mysql-5.1.73-linux-i686-glibc23.tar.gz
2. Unzip and rename
TAR-ZXVF mysql-5.1.73-linux-i686-glibc23.tar.gz
MV Mysql-5.1.73-linux-i686-glibc23/usr/local/mysql/3. Build MySQL user, create datadir directory. Useradd-s/sbin/nologin mysqlmkdir-p/data/mysql/chown MYSQL/DATA/MYSQL/4, initializes the database. Cd/usr/local/mysql./scripts/mysql_install_db--user=mysql--datadir=/data/mysql/See if there are 2 OK or echo $? To determine whether the initialization of the database was successful. After successful initialization, 2 directories of MySQL and test will be generated in/data/mysql. 5. Copy the configuration file, start the script, and add MySQL to the service list to set the boot up. CP support-files/mysql-large.cnf/etc/my.cnf CP Support-files/mysql.server/etc/init.d/mysqld modified/etc/init.d/ The Basedir DataDir in the mysqld configuration file. chmod 755/etc/init.d/mysqldchkconfig--add mysqldchkconfig mysqld on/etc/init.d/mysqld start two, common error analysis: 2.1 When you start MySQL, you are prompted Starting Mysql.manager ofPid-fileQuit without updating file. If the error message appears, the startup script file is not modified, basedir and DataDir are not specified. Of course, it depends on the log file. 2.2 Initialize MySQL error error:1004 can ' t ' Create file '/tmp/#sql618_1_0. frm ' (errno:13) Change the permissions of/tmp to 777chmod 777/tmp.
Third, the error log after specifying DATADIR, the MySQL error log is generally in the DataDir directory, and is named after the hostname. err file.
MySQL installation (binary compiler-free package) version 5.1