正常操作,中间不出现任何错误的step,源码安装不出错的可能性一般不大。
shell>groupadd mysql
shell>useradd -g mysql mysql
shell>gunzip < mysql-
VERSION
.tar.gz | tar -xvf -
shell>cd mysql-
VERSION
shell>./configure --prefix=/usr/local/mysql
shell>make
shell>make install
shell>cp support-files/my-medium.cnf /etc/my.cnf
shell>cd /usr/local/mysql
shell>chown -R mysql .
shell>chgrp -R mysql .
shell>bin/mysql_install_db --user=mysql
shell>chown -R root .
shell>chown -R mysql var
shell>bin/mysqld_safe --user=mysql &
这是sudo make install 出现的错误。
FATAL ERROR: Could not find mysqld
The following directories were searched:
/usr/libexec
/usr/sbin
/usr/bin
If you compiled from source, you need to run 'make install' to
copy the software into the correct location ready for operation.
If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.
cd libexec/
sudo cp * /usr/bin
sudo ./mysql_install_db --user=mysql
FATAL ERROR: Could not find errmsg.sys
The following directories were searched:
/usr/share/english
/usr/share/mysql/english
If you compiled from source, you need to run 'make install' to
copy the software into the correct location ready for operation.
If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.
cd share
cp -r mysql /usr/share/
Neither host 'ubuntu' nor 'localhost' could be looked up with
/usr/bin/resolveip
Please configure the 'hostname' command to return a correct
hostname.
If you want to solve this at a later stage, restart this script
with the --force option
sudo ./mysql_install_db --user=mysql --no-defaults
or cp ./resolveip /usr/bin