免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2002 | 回复: 3
打印 上一主题 下一主题

mysql第一次运行时出错 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-12-24 09:04 |只看该作者 |倒序浏览
在RHEL5下,安装的mysql-5.0.21

出现错误:

[root@localhost mysql]#bin/mysqld_safe --user=mysql
Starting mysqld daemon with databases from /usr/local/mysql/data
STOPPING server from pid file /usr/local/mysql/data/localhost.localdomain.pid
071224 08:52:41 mysqld ended

然后mysql就退出了,这是怎么回事呢?
在网上查了些方法都不管用,请大家指教!
十分感谢!!

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
2 [报告]
发表于 2007-12-24 11:16 |只看该作者
先执行一下

/bin/mysql_install_db --user=mysql

然后在
mysqld_safe &

论坛徽章:
0
3 [报告]
发表于 2007-12-24 17:25 |只看该作者
运行bin/mysql_install_db --user=mysql 了,输出结果如下:

Installing all prepared tables
Fill help 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 !
To do so, start the server, then issue the following commands:
/usr/local/mysql/bin/mysqladmin -u root password 'new-password'
/usr/local/mysql/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
See the manual for more instructions.

NOTE:  If you are upgrading from a MySQL <= 3.22.10 you should run
the /usr/local/mysql/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 /usr/local/mysql ; /usr/local/mysql/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 /usr/local/mysql/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


这个有没有错呢?
我觉得是提示性信息,不是错误啊!

论坛徽章:
0
4 [报告]
发表于 2007-12-24 17:51 |只看该作者
搞定了,用户权限的问题,呵呵

加了一个命令

chown -R root data/

就行了!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP