How to solve the problem of MySQL Binary Package installation and compilation in Linux

Source: Internet
Author: User

INSTALL the MySQL BINARY package according to the INSTALL-BINARY instructions. problems may occur in RedHat Linux. Other releases are not tested. Many people on the Forum are looking for a solution, I have an incorrect answer before, and I want to correct it here.

Shell> groupadd mysql
Shell> useradd-g mysql
Shell> cd/usr/local
Shell> gunzip </PATH/TO/MYSQL-VERSION-OS.tar.gz | tar xvf-
Shell> ln-s FULL-PATH-TO-MYSQL-VERSION-OS mysql
Shell> cd mysql
Shell> scripts/mysql_install_db -- user = mysql
Shell> chown-R root.
Shell> chown-R mysql data
Shell> chgrp-R mysql.
Shell> bin/mysqld_safe -- user = mysql &

After Continuous experiments, the root cause and solution have been found, and we hope it will be helpful.

Cause: MySQL with rpm package installed in Linux already has the/etc/my. cnf file, or the/etc/my. cnf file does not exist.

In both cases, follow the INSTALL-BINARY step. In shell> scripts/mysql_install_db -- user = mysql, the installation fails. (Check whether the database and table under data are complete. If there are only mysql and test directories, the operation fails ), so shell> bin/mysqld_safe -- user = mysql & the result of this step is mysql end!

Solution: Copy my-* from the support-files directory before shell> scripts/mysql_install_db -- user = mysql -*. the cnf file is under/etc/And then installed by step.

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.