LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 862|回复: 5

向大家求救!mysql为什么启不动?

[复制链接]
发表于 2003-6-16 16:26:02 | 显示全部楼层 |阅读模式
向大家求救了,我装了mysql后为什么启不动服务,我安装命令如下:
shell# tar zxvf mysql-standard-4.1.0-alpha-pc-linux-i686.tar.gz
shell# ln - s  mysql-standard-4.1.0-alpha-pc-linux-i686.tar.gz  mysql
shell# cd mysql
shell# scripts/mysql_install_db
shell# bin/safe_mysqld &
但是用ps -aux看不到mysql的服务,出现如下
Starting mysqld daemon with databases from /usr/local/mysql/data
030616 16:50:14  mysqld ended
  改用
./mysqld start
./mysqld: Can't change dir to '/usr/local/mysql-standard-4.1.0-alpha-pc-linux-i686/var/' (Errcode: 2)
030616 16:47:52  Aborting

030616 16:47:52  ./mysqld: Shutdown Complete
也起不动,改用
[root@ld-vod bin]# ./mysql start
ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)
也不行
请教大家了!
发表于 2003-6-16 17:30:58 | 显示全部楼层
ps -aux|grep mysql
看不到吗?
初始化数据库的时候有没有出错提示?
运行bin/safe_mysql & 应该就行了。
能不能把你的详细出错信息贴出来。
发表于 2003-6-16 17:50:52 | 显示全部楼层
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)
也不行
看看有没有这个问题,还有属性对不对
Can't change dir to '/usr/local/mysql-standard-4.1.0-alpha-pc-linux-i686/var/' (Errcode: 2)

ln - s mysql-standard-4.1.0-alpha-pc-linux-i686.tar.gz mysql
我看不懂了,你怎么把tar做连接啊……
如果只是写错了,你看看mysql下的目录属性对不对,我碰到过目录属性的问题。我那时候偷懒不高兴搞了,把所有的目录都做成777
终于可以启动mysql了 ……
 楼主| 发表于 2003-6-16 17:54:20 | 显示全部楼层
谢谢版主,在运行scripts/mysql_install_db 时出现如下,
Installing privilege tables

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 ld-vod password 'new-password'
See the manual for more instructions.

NOTE:  If you are upgrading from a MySQL <= 3.22.10 you should run
the ./bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!

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

You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl 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
这是不是已经初始化了.
为什么启动总是出现:

ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)或是:
Starting mysqld daemon with databases from /var/lib/mysql
030616 18:08:32  mysqld ended
用ps -aux|grep 看不到进程。黄叶兄请帮忙!
 楼主| 发表于 2003-6-16 18:17:37 | 显示全部楼层
终于搞定了,是我的用户群组没有设对,后来:
chown root.mysql mysql/*;
就可以了,谢谢大家!
发表于 2003-6-17 07:51:40 | 显示全部楼层
自己动手解决了问题最有映象而且也会收益更多。
有时候解决完了问题后再想一想,哦,然来这么简单呀。
呵呵,我也常常这样。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表