免费注册 查看新帖 |

Chinaunix

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

求助: mysql 数据库初始化失败 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-11-17 11:10 |只看该作者 |倒序浏览
显示“[root@localhost mysql]# bin/mysql_install_db --user=mysql
Installing MySQL system tables...
101118 11:08:36 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
101118 11:08:36 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
ERROR: 1062  Duplicate entry 'localhost-' for key 1
101118 11:08:36 [ERROR] Aborting

101118 11:08:36 [Note] /usr/local/mysql//libexec/mysqld: Shutdown complete

Installation of system tables failed!

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

shell> /usr/local/mysql//bin/mysql -u root mysql
mysql> show tables

Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /usr/local/mysql//var 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 /usr/local/mysql//bin/mysqlbug script!

论坛徽章:
0
2 [报告]
发表于 2010-11-17 11:11 |只看该作者
很着急,求各位帮帮忙

论坛徽章:
0
3 [报告]
发表于 2010-11-17 11:29 |只看该作者
这样的情况怎么解决阿

论坛徽章:
0
4 [报告]
发表于 2010-11-17 11:31 |只看该作者
[root@localhost mysql]# bin/mysql_install_db --user=mysql
Installing MySQL system tables...
101118 11:28:47 [Warning] option 'max_join_size': unsigned value 18446744073709551                  615 adjusted to 4294967295
101118 11:28:47 [Warning] option 'max_join_size': unsigned value 18446744073709551                  615 adjusted to 4294967295
ERROR: 1062  Duplicate entry 'localhost-' for key 1
101118 11:28:47 [ERROR] Aborting

101118 11:28:47 [Note] /usr/local/mysql//libexec/mysqld: Shutdown complete

Installation of system tables failed!

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

shell> /usr/local/mysql//bin/mysql -u root mysql
mysql> show tables

Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /usr/local/mysql//var 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 /usr/local/mysql//bin/mysqlbug script!

论坛徽章:
0
5 [报告]
发表于 2010-11-17 12:00 |只看该作者
回复 4# hankewhl


    两个问题:
1、你把MySQL的配置文件贴出来看看,有两个值太大了。
2、你所配置的数据库目录是不是本来就已经有数据库了?已经有数据库文件在里面了。好好看看

论坛徽章:
0
6 [报告]
发表于 2010-11-17 12:06 |只看该作者
还没有配置呢,刚编译安装完;数据库目录新建的,空的,什么都没有。

论坛徽章:
0
7 [报告]
发表于 2010-11-17 12:08 |只看该作者
系统是redhat5.4的,系统环境还需要做什么修改吗

论坛徽章:
0
8 [报告]
发表于 2010-11-17 12:29 |只看该作者
回复 7# hankewhl


    理论上你编译好了是不用再做什么改动的,看看my.cnf吧

论坛徽章:
0
9 [报告]
发表于 2010-11-17 13:04 |只看该作者
这个文件需要改吗

论坛徽章:
0
10 [报告]
发表于 2010-11-17 13:05 |只看该作者
# Example MySQL config file for medium systems.
#
# This is for a system with little memory (32M - 64M) where MySQL plays
# an important part, or systems up to 128M where MySQL is used together with
# other programs (such as a web server)
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /usr/local/mysql//var) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.

# The following options will be passed to all MySQL clients
[client]
#password       = your_password
port            = 3306
socket          = /tmp/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port            = 3306
socket          = /tmp/mysql.sock
skip-locking
key_buffer = 16M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP