MYSQL 启动时报
[root@test mysql-5.5.8]#
[root@test mysql-5.5.8]# ./bin/mysqld_safe --user=mysql &
[1] 23722
[root@test mysql-5.5.8]# 110505 15:05:07 mysqld_safe Logging to '/usr/local/mysql-5.5.8/data/test.err'.
110505 15:05:07 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql-5.5.8/data
[root@test mysql-5.5.8]#
[root@test mysql-5.5.8]#
[root@test mysql-5.5.8]#
[root@test mysql-5.5.8]#
这个错误
110505 15:03:39 [Note] Plugin 'FEDERATED' is disabled.
/usr/local/mysql-5.5.8/bin/mysqld: Table 'mysql.plugin' doesn't exist
110505 15:03:39 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
110505 15:03:39 InnoDB: The InnoDB memory heap is disabled
110505 15:03:39 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
110505 15:03:39 InnoDB: Compressed tables use zlib 1.2.3
110505 15:03:39 InnoDB: Initializing buffer pool, size = 128.0M
110505 15:03:39 InnoDB: Completed initialization of buffer pool
110505 15:03:39 InnoDB: highest supported file format is Barracuda.
110505 15:03:39 InnoDB: 1.1.5 started; log sequence number 1595675
110505 15:03:39 [Note] Recovering after a crash using mysql-bin
110505 15:03:39 [Note] Starting crash recovery...
110505 15:03:39 [Note] Crash recovery finished.
110505 15:03:39 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
后来发现是 my.cnf 文件出错如下:
”table_open_cache=64“
把它注掉 重新
mysql_install_db --user=mysql 就OK
[root@test bin]#
[root@test bin]# mysql_install_db --user=mysql
Installing MySQL system tables...
110505 15:12:26 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
110505 15:12:26 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
110505 15:12:26 [ERROR] /usr/libexec/mysqld: unknown variable 'table_open_cache=64'
Installation of system tables failed!
Examine the logs in /var/lib/mysql for more information.
You can try to start the mysqld daemon with:
/usr/libexec/mysqld --skip-grant &
and use the command line tool
/usr/bin/mysql to connect to the mysql
database and look at the grant tables:
shell> /usr/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 that may be helpful.
The latest information about MySQL is available on the web at
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/bin/mysqlbug script!
[root@test bin]#
[root@test bin]# mysql_install_db --user=mysql
Installing MySQL system tables...
110505 15:13:39 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
110505 15:13:39 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
110505 15:13:39 [ERROR] /usr/libexec/mysqld: unknown variable 'table_open_cache=64'
Installation of system tables failed!
Examine the logs in /var/lib/mysql for more information.
You can try to start the mysqld daemon with:
/usr/libexec/mysqld --skip-grant &
and use the command line tool
/usr/bin/mysql to connect to the mysql
database and look at the grant tables:
shell> /usr/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 that may be helpful.
The latest information about MySQL is available on the web at
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/bin/mysqlbug script!
[root@test bin]#
[root@test bin]#
[root@test bin]# vi /etc/my.cnf
# 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)
#
# MySQL programs look for option files in a set of
# locations which depend on the deployment platform.
# You can copy this option file to one of those
# locations. For information about these locations, see:
# http://dev.mysql.com/doc/mysql/en/option-files.html
#
# 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-external-locking
key_buffer_size = 16M
max_allowed_packet = 1M
table_open_cache = 64M
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
#
阅读(1920) | 评论(0) | 转发(0) |