Linux configuration MySQL resolution encountered a new problem two.

Source: Internet
Author: User

    1. Download MySQL to/usr/local/src/

cd/usr/local/src/
wget http://syslab.comsenz.com/downloads/linux/mysql-5.1.40-linux-i686-icc-glibc23.tar.gz
    1. Extract

[Email protected] src]# tar zxvf/usr/local/src/mysql-5.1.40-linux-i686-icc-glibc23.tar.gz
    1. Move the extracted data to the/usr/local/mysql

[Email protected] src]# MV Mysql-5.1.40-linux-i686-icc-glibc23/usr/local/mysql
    1. Build MySQL User

[[email protected] src]# useradd-s/sbin/nologin MySQL
    1. Initializing the database

[[email  Protected] src]# cd /usr/local/mysql 
[[Email protected] mysql]# mkdir -p  /data/mysql ; chown -r mysql:mysql /data/mysql
[[email protected]  Mysql]# ./scripts/mysql_install_db --user=mysql --datadir=/data/mysql

--userdefine the owner of the database, --datadir define where the database is installed, and it is recommended to place it on a partition of large space, which needs to be created on its own. This step is critical if you see two "OK" instructions to execute correctly.

I've had a problem here before.

It is. Can't find the file. And then I hit a RMP bag.
yum-y Install Libaio libaio-devel

    1. Copy configuration file

[email protected] mysql]# CP support-files/my-large.cnf/etc/my.cnf
    1. Copy the startup script file and modify its properties

[email protected] mysql]# CP support-files/mysql.server/etc/init.d/mysqld
[Email protected] mysql]# chmod 755/etc/init.d/mysqld
    1. modifying startup scripts

[Email protected] mysql]# Vim/etc/init.d/mysqld

There are "Datadir=/data/mysql" where modifications are required (the directory defined when the database was previously initialized)

    1. Add the startup script to the system service entry and set the boot start to start MySQL

[Email protected] mysql]# chkconfig--add mysqld
[Email protected] mysql]# chkconfig mysqld on
[[Email protected] mysql]# service mysqld start

If not, please check the error log under/data/mysql/, which is usually the hostname. Err. The command to check if MySQL starts is:

[[Email protected] mysql]# PS aux |grep mysqld


This article is from the "Aming-linux Learning" blog, so be sure to keep this source http://937174156.blog.51cto.com/8141519/1725623

Linux configuration MySQL resolution encountered a new problem two.

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.