真的,今天真的很高兴,终于将mysql-standard-5.0.26-linux-i686-glibc23.tar.gz安装成功了.....
整整花了我两天半的时间.....痛苦啊~~~~~在其中,我将linux由redhat9升级为RHEL as4
原以为是redhat9与人家教程试验的环境不一样,没法,求师傅给了个RHEL as4
可结果还是出现相同的错误......郁闷.....原想放弃,可....心放不下....睡觉还想这这个家伙,根本无法安心继续学习.....
其实,报错,提示是有的...只不过英语太差....难道真的完了....得了,啃英语吧....
功夫不负有心人,终于能看懂一点安装文件了....哈哈...
废话不多说了,我可不想被扔鸡蛋....
操作步骤:
(1)下载http://www.mysql.com
(2)解压tar zxvf mysql-standard-5.0.26-linux-i686-glibc23.tar.gz
(3)ln -s mysql-standard-5.0.26-linux-i686-glibc23 mysql
(4)cd mysql
(5)more INSTALL-BINARY
节选:
The basic commands that you must execute to install and use a MySQL
binary distribution are:
shell> groupadd mysql
shell> useradd -g mysql 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
#修改mysql原始root用户密码(安全性重要)
#PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL #root USER !To do so, start the server, then #issue the following commands:
#./bin/mysqladmin -u root password 'new-password'
#./bin/mysqladmin -u root -h hahazhu.com password 'new-password'
shell> chown -R root .
shell> chown -R mysql data
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &
#After everything has been unpacked and installed, #you should test your distribution. To start the #MySQL server, use the following command:
shell> bin/mysqld_safe --user=mysql &
这上面的安装步骤,够详细了吧.
(6)不过,我照着做了,可还是出错.查看
错误:
====================================================
./bin/mysqld_safe --user=mysql &
[1] 3893
[root@hahazhu mysql]# Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/run/mysqld/mysqld.pid
061019 18:01:23 mysqld ended
=====================================================
我原先跟着提示到cd /var/run/mysqld 奶奶的,根本没这个文件夹....晕~~~~
于是再看more INSTALL-BINARY
shell> bin/mysqld_safe --user=mysql &
If that command fails immediately and prints `mysqld ended', you can
find some information in the `HOST_NAME.err' file in the data directory.
最后说,如果这个命令出错,出现mysqld ended,那么你可以到data这个目录下查看这个错误提示,可搞死我到这个目录下,没看到,不知道什么原因,幸亏在一个bbs下,看到,你去看下/var/lib/mysql/mysql.sock 这个文件是否在,哈哈.真巧,发现了hahazhu.com.err,真是得来全不废功夫.....
more hahazhu.com.err
==================
061019 18:01:23 InnoDB: Started; log sequence number 0 43655
061019 18:01:23 [ERROR] /usr/local/mysql/bin/mysqld: Can't create/write to file
'/var/run/mysqld/mysqld.pid' (Errcode: 2)
061019 18:01:23 [ERROR] Can't start server: can't create PID file: No such file
or directory
====================
呵呵.死马当活马医,mkdir /var/run/mysql
chown mysql.mysql mysql
哈哈....
终于成功了.....