According to the step-by-step installation of mysql under Fedora7, some problems occurred while installing mysql in Fedora 8. After finding the cause, I finally solved the problem. Remember.
I download the latest mysql-5.0.45-linux-i686.tar.gz
Installation Process:
Su to root permission.
# Tar-zvxf mysql-5.0.45-linux-i686.tar.gz
# Music mysql-5.0.45 // usr/local/mysql
# Cd/usr/local/mysql
# Groupadd mysql
# Useradd-g mysql
# Chown-R mysql.
# Chgrp-R mysql.
# Scripts/mysql_install_db -- user = mysql
# Chown-R root.
# Chown-R mysql data
# Bin/mysqld_safe -- user = mysql &
According to the official documentation, this should be enabled, but the following error is reported:
Nohup: ignoring input and redirecting stderr to stdout
Starting mysqld daemon with databases from/var/lib/mysql
STOPPING server from pid file/var/run/mysqld. pid
071112 00:22:06 mysqld ended
View logs:
# Less/var/log/mysqld. log
One section is as follows:
071112 0:22:06 [ERROR]/usr/local/mysql/bin/mysqld: Can't create/write to file '/var/run/mysqld. pid '(Errcode: 2)
071112 0:22:06 [ERROR] Can't start server: can't create PID file: No such file or directory
071112 00:22:06 mysqld ended
# Cd/var/run/
# Ls
The mysqld directory does not exist.
# Mkdir/var/run/mysqld
# Cd/var/run/mysqld
Create the mysqld. pid file.
# Touch mysqld. pid
# Cd ..
# Chown-R mysql mysqld.
# Cd/usr/local/mysql/
# Bin/mysqld_safe -- user = mysql &
Nohup: ignoring input and redirecting stderr to stdout
Starting mysqld daemon with databases from/var/lib/mysql