MySQL installation (binary compiler-free package) version 5.1

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.