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.