mysql-5.0.51a-linux-i686.tar.gz安装问题~(其他的安装类似)

binbo2008 2008-03-26 06:22:26
加精
希望大家帮忙解决一下,谢谢拉!
[root@MMAPLinuxEnt4 local]# tar zxvf mysql-5.0.51a-linux-i686.tar.gz
.....
mysql-5.0.51a-linux-i686/include/myisampack.h
mysql-5.0.51a-linux-i686/include/my_alarm.h
mysql-5.0.51a-linux-i686/include/mysql_time.h
mysql-5.0.51a-linux-i686/include/my_alloc.h
mysql-5.0.51a-linux-i686/include/my_time.h
mysql-5.0.51a-linux-i686/include/m_string.h
mysql-5.0.51a-linux-i686/include/my_tree.h
mysql-5.0.51a-linux-i686/include/my_user.h
mysql-5.0.51a-linux-i686/COPYING
[root@MMAPLinuxEnt4 local]# ls
bin mysql-standard-4.0.23-pc-linux-i686
etc mysql-standard-4.1.7-pc-linux-i686
games mysql-standard-4.1.7-pc-linux-i686.tar.gz
include MySQL v5.0.27 For Red Hat 3 .rpm
lib MySQL v5.0.27 For SuSE Linux 9 RP.rpm
libexec sbin
mysql-5.0.51a-linux-i686 share
mysql-5.0.51a-linux-i686.tar.gz src
[root@MMAPLinuxEnt4 local]# ln -s mysql-5.0.51a-linux-i686 mysql

[root@MMAPLinuxEnt4 local]# ls

bin mysql-standard-4.0.23-pc-linux-i686
etc mysql-standard-4.1.7-pc-linux-i686
games mysql-standard-4.1.7-pc-linux-i686.tar.gz
include MySQL v5.0.27 For Red Hat 3 .rpm
lib MySQL v5.0.27 For SuSE Linux 9 RP.rpm
libexec sbin
mysql share
mysql-5.0.51a-linux-i686 src
mysql-5.0.51a-linux-i686.tar.gz

[root@MMAPLinuxEnt4 local]# cd mysql

[root@MMAPLinuxEnt4 mysql]# groupadd mysql

groupadd: group mysql exists
[root@MMAPLinuxEnt4 mysql]# useradd -g mysql mysql
useradd: user mysql exists
[root@MMAPLinuxEnt4 mysql]# ./configure --prefix=/usr/local/mysql
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.

Installing MySQL system tables...
OK
Filling help tables...
OK

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 !
To do so, start the server, then issue the following commands:
./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h MMAPLinuxEnt4 password 'new-password'

Alternatively you can run:
./bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd . ; ./bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl

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 http://shop.mysql.com
Starting the mysqld server. You can test that it is up and running
with the command:
./bin/mysqladmin version
[root@MMAPLinuxEnt4 mysql]# Starting mysqld daemon with databases from

/usr/local/mysql/data
STOPPING server from pid file /usr/local/mysql/data/MMAPLinuxEnt4.pid
080326 19:21:19 mysqld ended

[root@MMAPLinuxEnt4 mysql]# ./scripts/mysql_install_db --user=mysql
Installing MySQL system tables...
080326 19:22:50 [Warning] No argument was provided to --log-bin, and --log

-bin-index was not used; so replication may break when this MySQL server

acts as a master and has his hostname changed!! Please use '--log-

bin=/var/lib/mysql/mysql/MMAPLinuxEnt4-bin' to avoid this problem.
./bin/mysqld: File '/var/lib/mysql/mysql/MMAPLinuxEnt4-bin.index' not found

(Errcode: 13)
080326 19:22:50 [ERROR] Aborting

080326 19:22:50 [Note] ./bin/mysqld: Shutdown complete

Installation of system tables failed!

Examine the logs in /var/lib/mysql/mysql for more information.
You can try to start the mysqld daemon with:
./bin/mysqld --skip-grant &
and use the command line tool
./bin/mysql to connect to the mysql
database and look at the grant tables:

shell> ./bin/mysql -u root mysql
mysql> show tables

Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /var/lib/mysql/mysql that may be helpful.

The latest information about MySQL is available on the web at
http://www.mysql.com
Please consult the MySQL manual section: 'Problems running

mysql_install_db',
and the manual section that describes problems on your OS.
Another information source is the MySQL email archive.
Please check all of the above before mailing us!
And if you do mail us, you MUST use the ./bin/mysqlbug script

[root@MMAPLinuxEnt4 mysql]# ./bin/mysqld_safe &
[1] 23549

[root@MMAPLinuxEnt4 mysql]# Starting mysqld daemon with databases from

/var/lib/mysql/mysql
STOPPING server from pid file /var/run/mysqld/mysqld.pid
080326 19:26:37 mysqld ended
[root@MMAPLinuxEnt4 mysql]# chown -R root .
[root@MMAPLinuxEnt4 mysql]# chown -R mysql data
[root@MMAPLinuxEnt4 mysql]# chgrp -R mysql .
[root@MMAPLinuxEnt4 mysql]# chown -R mysql /var/run/mysqld/mysqld.pid
chown: failed to get attributes of `/var/run/mysqld/mysqld.pid': No such

file or directory
[root@MMAPLinuxEnt4 mysql]# bin/mysqld_safe --user=mysql &
[1] 23753
[root@MMAPLinuxEnt4 mysql]# Starting mysqld daemon with databases from

/var/lib/mysql/mysql
STOPPING server from pid file /var/run/mysqld/mysqld.pid
080326 19:28:04 mysqld ended


[1]+ Done bin/mysqld_safe --user=mysql
[root@MMAPLinuxEnt4 mysql]# bin/mysqladmin -u root passwor '1234'
bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket

'/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
[root@MMAPLinuxEnt4 mysql]# ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

-------------服务器目录上没有mysql.sock这个文件.

[root@MMAPLinuxEnt4 mysql]# bin/mysqladmin -u root passwor '1234'
bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket

'/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!



[1]+ Done ./bin/mysqld_safe






...全文
5918 21 打赏 收藏 转发到动态 举报
写回复
用AI写文章
21 条回复
切换为时间正序
请发表友善的回复…
发表回复
linscooter 2010-12-27
  • 打赏
  • 举报
回复
BZ的问题,在于mysql登录的用户名和密码错误。安装server包后,还要安装client包。server没有启用,则出sock的报警。
mysql -u root (初始时没有密码,用这个来登录。前提server启动,client 包安装了)

baggio1984 2010-11-01
  • 打赏
  • 举报
回复
关注 mark
xiechunmei13 2010-10-17
  • 打赏
  • 举报
回复
同样的问题。。。谢谢
linke007 2009-08-14
  • 打赏
  • 举报
回复
[Quote=引用 17 楼 wxxhxy 的回复:]


步骤10这步的时候,前面的这个文件也没有的啊。
[root@mylinux support-files]# ls
binary-configure.sh  my-huge.cnf.sh            mysql-log-rotate.sh
MacOSX              my-innodb-heavy-4G.cnf.sh  mysql.server.sh
magic                my-large.cnf.sh            MySQL-shared-compat.spec.sh
Makefile.am          my-medium.cnf.sh          mysql.spec.sh
Makefile.in          my-small.cnf.sh            ndb-config-2-node.ini.sh

怎么看显示的是my-medium.cnf.sh 这个文件的啊。

还有我安装rpm包的时候,rpm的时候显示的信息到start的时候却提示【FAILED】,忘高手指点下。
[/Quote]




可以说详细点吗
wxxhxy 2009-08-13
  • 打赏
  • 举报
回复


[Quote=引用 15 楼 linke007 的回复:]
1. 执行 cd /usr/down
去到mysql源码所在目录.
2. 执行 groupadd mysql
3. 执行 useradd -g mysql mysql
4. 执行 tar -zxvf mysql-5.0.37.tar.gz
5. 执行 cd mysql-5.0.37
6. 执行 ./configure --prefix=/server/mysql
7. 执行 make
8. 执行 make install
9. 执行 /server/mysql/bin/mysql_install_db --user=mysql
10. 执行 cp support-files/my-medium.cnf /etc/my.cnf
11. 执行 cp support-files/mysql.server /etc/rc.d/init.d/mysqld
12. 执行 chmod 700 /etc/rc.d/init.d/mysqld
13. 执行 chkconfig --add mysqld
14. 执行 cd /server/mysql        /////进入mysql安装目录.
并执行 chown -R root .          ///注意:不要漏了后面的 "."
15. 执行 chown -R mysql var
16. 执行 chgrp -R mysql .                      ////不要漏掉"."
17. 执行 /server/mysql/bin/mysqld_safe --user=mysql &        ////启动mysql
18. 在出现 mysqld ended 的时候.点击回车.回到命令行
19. 执行 bin/mysql -u root -p          ////楼主大概是在这部之后才出的问题吧^_^
20.系统会提示输入密码.由于我们安装时没有设置密码.所以默认密码为空.直接点击回车进入
如果一切OK,亲切的欢迎界面就出来了


以上配置,我是参考phpfans的
http://bbs.lampchina.net/thread-106868-1-1.html

[/Quote]



步骤10这步的时候,前面的这个文件也没有的啊。
[root@mylinux support-files]# ls
binary-configure.sh my-huge.cnf.sh mysql-log-rotate.sh
MacOSX my-innodb-heavy-4G.cnf.sh mysql.server.sh
magic my-large.cnf.sh MySQL-shared-compat.spec.sh
Makefile.am my-medium.cnf.sh mysql.spec.sh
Makefile.in my-small.cnf.sh ndb-config-2-node.ini.sh

怎么看显示的是my-medium.cnf.sh 这个文件的啊。

还有我安装rpm包的时候,rpm的时候显示的信息到start的时候却提示【FAILED】,忘高手指点下。
wxxhxy 2009-08-13
  • 打赏
  • 举报
回复
我按照步骤安装,怎么都没找到这个/etc/my.cnf文件,
linke007 2009-08-11
  • 打赏
  • 举报
回复
1. 执行 cd /usr/down
去到mysql源码所在目录.
2. 执行 groupadd mysql
3. 执行 useradd -g mysql mysql
4. 执行 tar -zxvf mysql-5.0.37.tar.gz
5. 执行 cd mysql-5.0.37
6. 执行 ./configure --prefix=/server/mysql
7. 执行 make
8. 执行 make install
9. 执行 /server/mysql/bin/mysql_install_db --user=mysql
10. 执行 cp support-files/my-medium.cnf /etc/my.cnf
11. 执行 cp support-files/mysql.server /etc/rc.d/init.d/mysqld
12. 执行 chmod 700 /etc/rc.d/init.d/mysqld
13. 执行 chkconfig --add mysqld
14. 执行 cd /server/mysql /////进入mysql安装目录.
并执行 chown -R root . ///注意:不要漏了后面的 "."
15. 执行 chown -R mysql var
16. 执行 chgrp -R mysql . ////不要漏掉"."
17. 执行 /server/mysql/bin/mysqld_safe --user=mysql & ////启动mysql
18. 在出现 mysqld ended 的时候.点击回车.回到命令行
19. 执行 bin/mysql -u root -p ////楼主大概是在这部之后才出的问题吧^_^
20.系统会提示输入密码.由于我们安装时没有设置密码.所以默认密码为空.直接点击回车进入
如果一切OK,亲切的欢迎界面就出来了



以上配置,我是参考phpfans的
http://bbs.lampchina.net/thread-106868-1-1.html
linke007 2009-08-11
  • 打赏
  • 举报
回复
呵呵补充下,将/etc/my.cnf里面的 skip federated注释掉即可。
linke007 2009-08-11
  • 打赏
  • 举报
回复
楼主的情况我深有体会:
ERROR 2002: Can't connect to local MySQL server through socket '/tmp/tmp/mysql.sock' (2)
建议楼主看mysql错误日志,我的是在/usr/local/mysql/data 下的 hostname.err
我说下我碰到的情况(可能不一定跟你的一样,或许有参考意义)
当时我google,baidu了好多天,也没结果,最后找到篇文章,说看mysql错误日志,我打开我的mysql错误日志:
090105 20:47:28 mysqld_safe Starting mysqld daemon with databases from /data/mysql/data
090105 20:47:29 [ERROR] /usr/local/mysql/libexec/mysqld: unknown option '--skip-federated'
090105 20:47:29 [ERROR] Aborting

090105 20:47:29 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete

090105 20:47:29 mysqld_safe mysqld from pid file /data/mysql/data/njcitweb.njcit.edu.cn.pid ended
090105 20:53:43 mysqld_safe Starting mysqld daemon with databases from /data/mysql/data

网上帖子说:关键是090105 20:47:29 [ERROR] /usr/local/mysql/libexec/mysqld: unknown option '--skip-federated'这一条,只要将其注释掉即可,我是这样做的,而且注释掉之后,立马安装顺利,楼主可以试试,如果不行,呵呵,小弟也没招了,能力到此了
gs380981 2008-10-30
  • 打赏
  • 举报
回复
[Quote=引用 5 楼 des2006 的回复:]

下载mysql后找到INSTALL-SOURCE这个文件,三分之一处里面有详细的安装说明 ,严格按照这个步骤做


不成功的话,估计要重装了
[/Quote]

确实得看这个!!!
捉摸了两天,好累,找到自己对应包包的安装方法!!
但是不知道怎么把之前错误安装的删除掉~~~~
songsw1983 2008-04-28
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 binbo2008 的回复:]
[root@MMAPLinuxEnt4 mysql]# service mysql start
Starting MySQL................................... [FAILED]
[/Quote]


修改/etc/selinux/config文件
把那项设置成disabled(一共三种选择)
然后重启机器
懒得去死 2008-04-07
  • 打赏
  • 举报
回复
加精华,以后做一个基本的参考!
binbo2008 2008-03-28
  • 打赏
  • 举报
回复
SSH远程登陆,没法“管理”->"服务"->找到“mysql”这样操作。
des2006 2008-03-27
  • 打赏
  • 举报
回复

下载mysql后找到INSTALL-SOURCE这个文件,三分之一处里面有详细的安装说明 ,严格按照这个步骤做

另外,如过找不到文件,可以查看一下文件的权限



此外,我也遇过你这种情况

可以试一下
“管理”->"服务"->找到“mysql”
如果没有,说明安装失败
如果有,把它停止,才启动,看成功与否,我在这一步成功了

不成功的话,估计要重装了
binbo2008 2008-03-27
  • 打赏
  • 举报
回复
[root@MMAPLinuxEnt4 mysql]# service mysql start
Starting MySQL................................... [FAILED]
binbo2008 2008-03-27
  • 打赏
  • 举报
回复
这是安装出现的情况
[root@MMAPLinuxEnt4 local]# ls
bin MySQL-server-5.0.22-0.i386.rpm
etc mysql-standard-4.0.23-pc-linux-i686
games mysql-standard-4.1.7-pc-linux-i686
include mysql-standard-4.1.7-pc-linux-i686.tar.gz
lib MySQL v5.0.27 For Red Hat 3 .rpm
libexec MySQL v5.0.27 For SuSE Linux 9 RP.rpm
mysql-5.0.51a-linux-i686 sbin
mysql-5.0.51a-linux-i686.tar.gz share
MySQL-client-5.0.22-0.i386.rpm src
[root@MMAPLinuxEnt4 local]# rm -f mysql-standard-4.1.7-pc-linux-i686
rm: cannot remove `mysql-standard-4.1.7-pc-linux-i686': Is a directory
[root@MMAPLinuxEnt4 local]# rm -f mysql-standard-4.0.23-pc-linux-i686
rm: cannot remove `mysql-standard-4.0.23-pc-linux-i686': Is a directory
[root@MMAPLinuxEnt4 local]# ln -s mysql-5.0.51a-linux-i686 mysql
[root@MMAPLinuxEnt4 local]# ls
bin MySQL-server-5.0.22-0.i386.rpm
etc mysql-standard-4.0.23-pc-linux-i686
games mysql-standard-4.1.7-pc-linux-i686
include mysql-standard-4.1.7-pc-linux-i686.tar.gz
lib MySQL v5.0.27 For Red Hat 3 .rpm
libexec MySQL v5.0.27 For SuSE Linux 9 RP.rpm
mysql sbin
mysql-5.0.51a-linux-i686 share
mysql-5.0.51a-linux-i686.tar.gz src
MySQL-client-5.0.22-0.i386.rpm
[root@MMAPLinuxEnt4 local]# cd mysql
[root@MMAPLinuxEnt4 mysql]# chown -R root .
[root@MMAPLinuxEnt4 mysql]# chown -R mysql data
[root@MMAPLinuxEnt4 mysql]# chgrp -R mysql .
[root@MMAPLinuxEnt4 mysql]# cp support-files/my-large.cnf /etc/my.cnf
[root@MMAPLinuxEnt4 mysql]# cp support-files/mysql.server /etc/init.d/mysql5
[root@MMAPLinuxEnt4 mysql]# chkconfig --add mysql5
[root@MMAPLinuxEnt4 mysql]# mysql -uroot -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
binbo2008 2008-03-27
  • 打赏
  • 举报
回复
这么多我安装那个都不成功,愚昧呀!感谢高手指教。
des2006 2008-03-27
  • 打赏
  • 举报
回复
[Quote=引用 6 楼 binbo2008 的回复:]
我的是linux系统,安装不一样
[/Quote]
5楼给的就是linux的安装方法呀,INSTALL-SOURCE是个文本文件
binbo2008 2008-03-27
  • 打赏
  • 举报
回复
我的是linux系统,安装不一样
懒得去死 2008-03-26
  • 打赏
  • 举报
回复
bin mysql-standard-4.0.23-pc-linux-i686
etc mysql-standard-4.1.7-pc-linux-i686
games mysql-standard-4.1.7-pc-linux-i686.tar.gz
include MySQL v5.0.27 For Red Hat 3 .rpm
lib MySQL v5.0.27 For SuSE Linux 9 RP.rpm
libexec sbin

怎么会有这么多?

安装之前请确认你的/etc/my.cnf是否存在?存在的话先干掉!


正确安装方法:

1、tar zxvf mysql-5.0.51a-linux-i686.tar.gz
2、ln -s 刚解压的目录 /usr/local/mysql
3、cd /usr/local/mysql
4、chown -R root .
5、chown -R mysql data
6、chgrp -R mysql .
7、cp support-files/my-large.cnf /etc/my.cnf
8、cp support-files/mysql.server /etc/init.d/mysql5
9、chkconfig --add mysql5
10、进入MYSQL.

56,687

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧