我的运行环境是:
linux:rh9
要编译的mysql:mysql-max-3.23.58-pc-linux-i686.tar
编译方法:按照mysql官方文档操作
结果:没有编译成功
mymail:linhong163 at hotmail.com
QQ:354307988
---------------------------------------------------------------------------------------------------------------
官方的文档提示如下进行:
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> bin/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql var
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &
我只做到了configure --prefix=/usr/local/mysql一步,出错提示如下:
# ./configure --prefix=/usr/local/msyql
NOTE: This is a MySQL binary distribution. It's ready to run, you don't
need to configure it!
To help you a bit, I am now going to create the needed MySQL databases
and start the MySQL server for you. If you run into any trouble, please
consult the MySQL manual, that you can find in the Docs directory.
Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
Installing all prepared tables
ERROR: 1062 Duplicate entry 'localhost-root' for key 1
ERROR: 1062 Duplicate entry 'localhost-root' for key 1
050328 12:59:34 ./bin/mysqld: Shutdown Complete
To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
This is done with:
./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h localhost password 'new-password'
See the manual for more instructions.
You can start the MySQL daemon with:
cd . ; ./bin/safe_mysqld &
You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; run-all-tests
Please report any problems with the ./bin/mysqlbug script!
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at
https://order.mysql.com
Starting the mysqld server. You can test that it is up and running
with the command:
./bin/mysqladmin version
[root@localhost mysql]# Starting mysqld daemon with databases from /usr/local/my
sql/data
050328 12:59:34 mysqld ended
实在不行 我把整个目录拷贝到/usr/local/mysql下
直接运行bin下的启动命令,出错如下:
# ./safe_mysqld --user=mysql &
[1] 3437
[root@localhost bin]# The file /usr/local/mysql/libexec/mysqld doesn't exist or is not executable
Please do a cd to the mysql installation directory and restart
this script from there as follows:
./bin/safe_mysqld.
[1]+ Exit 1 ./safe_mysqld --user=mysql
-----------------------------------------------------------------------------------------------------------------
之前我安装rpm运行成功过,后来rpm -e了,现在编译一直无法成功