tar zxvf mysql-5.1.45.tar.gz cd mysql-5.1.45 ./configure --prefix=/var/lib/mysql --without-debug --with-charset=utf8 --with-extra-charsets=all --with-plugins=all make make install cp support-files/my-medium.cnf /etc/my.cnf cd /var/lib/mysql/bin ./mysql_install_db --user=mysql chown -R root . cd .. chown -R mysql /var/ chgrp -R mysql . cd ../mysql/bin/ ./mysqld_safe --user=mysql & ----查看err.log cd /var/lib/mysql/share/mysql/ cp mysql.server /etc/init.d/mysql ./mysql.server start ./mysqld_safe --defaults-file =/etc/my.cnf /etc/init.d/mysql restart cd /var/lib/mysql/bin/ cp mysql /usr/bin/ 我的步骤,不知道楼主看的明白不;
又杯具了……server:/var/lib/mysql/bin# ./mysql_install_db --user=mysqlFATAL ERROR: Could not find mysqldThe following directories were searched: /usr/libexec /usr/sbin /usr/binIf 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.
我怀疑是不是和我下载的源码有关呢? 我下的版本是: mysql-5.1.48.tar.gz
mysql 用户和用户组建了吗?是到: cd /var/lib/mysql/bin ./mysql_install_db --user=mysql 这一步吗?
嗯server:/var/lib/mysql/bin# groupadd mysql server:/var/lib/mysql/bin# useradd -g mysql mysql server:/var/lib/mysql/bin# ./mysql_install_db --user=mysqlFATAL ERROR: Could not find mysqldThe following directories were searched: /usr/libexec /usr/sbin /usr/binIf 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.
server:/var/lib/mysql/bin# ./mysql_install_db --user=mysql --basedir=/var/lib/mysql/ Installing MySQL system tables... 110124 12:21:11 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead. 110124 12:21:11 [ERROR] /var/lib/mysql//libexec/mysqld: unknown option '--skip-bdb' 110124 12:21:11 [ERROR] Aborting110124 12:21:11 [Note] /var/lib/mysql//libexec/mysqld: Shutdown complete Installation of system tables failed! Examine the logs in /var/lib/mysql for more information.You can try to start the mysqld daemon with: shell> /var/lib/mysql//libexec/mysqld --skip-grant &and use the command line tool /var/lib/mysql//bin/mysql to connect to the mysql database and look at the grant tables: shell> /var/lib/mysql//bin/mysql -u root mysql mysql> show tablesTry 'mysqld --help' if you have problems with paths. Using --log gives you a log in /var/lib/mysql that may be helpful.Please consult the MySQL manual section 'Problems running mysql_install_db', and the manual section that describes problems on your OS. Another information source are the MySQL email archives available at http://lists.mysql.com/.Please check all of the above before mailing us! And remember, if you do mail us, you MUST use the /var/lib/mysql//scripts/mysqlbug script!
刚话了半个小时又重新编译了下,按照1楼的来,没问题.. mysql> select version(); +------------+ | version() | +------------+ | 5.1.45-log | +------------+ 1 row in set (0.00 sec)
cd mysql-5.1.45
./configure --prefix=/var/lib/mysql --without-debug --with-charset=utf8 --with-extra-charsets=all --with-plugins=all
make
make install
cp support-files/my-medium.cnf /etc/my.cnf
cd /var/lib/mysql/bin
./mysql_install_db --user=mysql
chown -R root .
cd ..
chown -R mysql /var/
chgrp -R mysql .
cd ../mysql/bin/
./mysqld_safe --user=mysql & ----查看err.log
cd /var/lib/mysql/share/mysql/
cp mysql.server /etc/init.d/mysql
./mysql.server start
./mysqld_safe --defaults-file =/etc/my.cnf
/etc/init.d/mysql restart
cd /var/lib/mysql/bin/
cp mysql /usr/bin/
我的步骤,不知道楼主看的明白不;
又杯具了……server:/var/lib/mysql/bin# ./mysql_install_db --user=mysqlFATAL ERROR: Could not find mysqldThe following directories were searched: /usr/libexec
/usr/sbin
/usr/binIf 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.
我下的版本是:
mysql-5.1.48.tar.gz
cd /var/lib/mysql/bin
./mysql_install_db --user=mysql
这一步吗?
嗯server:/var/lib/mysql/bin# groupadd mysql
server:/var/lib/mysql/bin# useradd -g mysql mysql
server:/var/lib/mysql/bin# ./mysql_install_db --user=mysqlFATAL ERROR: Could not find mysqldThe following directories were searched: /usr/libexec
/usr/sbin
/usr/binIf 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.
这样呢?
server:/var/lib/mysql/bin# ./mysql_install_db --user=mysql --basedir=/var/lib/mysql/
Installing MySQL system tables...
110124 12:21:11 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
110124 12:21:11 [ERROR] /var/lib/mysql//libexec/mysqld: unknown option '--skip-bdb'
110124 12:21:11 [ERROR] Aborting110124 12:21:11 [Note] /var/lib/mysql//libexec/mysqld: Shutdown complete
Installation of system tables failed! Examine the logs in
/var/lib/mysql for more information.You can try to start the mysqld daemon with: shell> /var/lib/mysql//libexec/mysqld --skip-grant &and use the command line tool /var/lib/mysql//bin/mysql
to connect to the mysql database and look at the grant tables: shell> /var/lib/mysql//bin/mysql -u root mysql
mysql> show tablesTry 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /var/lib/mysql that may be helpful.Please consult the MySQL manual section
'Problems running mysql_install_db', and the manual section that
describes problems on your OS. Another information source are the
MySQL email archives available at http://lists.mysql.com/.Please check all of the above before mailing us! And remember, if
you do mail us, you MUST use the /var/lib/mysql//scripts/mysqlbug script!
mysql> select version();
+------------+
| version() |
+------------+
| 5.1.45-log |
+------------+
1 row in set (0.00 sec)
这样不用创建新用户,一样可以运行。
无需root权限http://blog.csdn.net/ldb2741/archive/2010/08/20/5827571.aspx