The MySQL database is correctly installed in the linux operating system.

Source: Internet
Author: User

The following article describes how to correctly install the MySQL database in the linux operating system. First, we started by adding a MySQL database group and creating a MySQL database user, the following is the detailed description of the article.

1. Add a MySQL group and create a MySQL user

 
 
  1. groupadd MySQL  
  2. useradd -g MySQL MySQL 

2、decompress mysql-5.1.36.tar.gz

 
 
  1. tar -xzvf MySQL-5.1.36.tar.gz 

3. Go to the decompressed directory and compile and install the package.

 
 
  1. cd MySQL-5.1.36  
  2. ./configure --prefix=/usr/local/MySQL --with-charset=utf8 --with-extra-charsets=all 

    --enable-assembler --enable-thread-safe-client --with-big-tables --with-readline 

    --with-ssl --with-embedded-server --with-plugins=all 
  3. make  
  4. make install 

4. Copy the configuration file

 
 
  1. cp support-files/my-large.cnf /etc/my.cnf 

Update the owner and user group of the/usr/local/MySQL folder.

 
 
  1. cd /usr/local/MySQL/  
  2. chown -R MySQL .  
  3. chgrp -R MySQL . 

4. Configure the services started with the server

 
 
  1. cp /home/MySQL-5.1.36/support-files/MySQL.server /etc/init.d/MySQLd  
  2. chmod 755 /etc/init.d/MySQLd  
  3. chkconfig --add MySQLd 

7. initialize MySQL

 
 
  1. bin/MySQL_install_db --user=MySQL 

8. Start MySQL

 
 
  1. bin/MySQLd_safe --user=MySQL 

If the MySQL ended statement is not displayed, it indicates that the instance is successfully started.

9. Update the user's root password.

 
 
  1. /usr/local/MySQL/bin/MySQLadmin -u root password 123456 

The above content is an introduction to the installation process of the MySQL database in linux. I hope you will have some gains.

Related Article

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.