【问题标题】:Configuring InnoDB for MySQL database on Mac在 Mac 上配置 InnoDB for MySQL 数据库
【发布时间】:2011-10-29 13:49:13
【问题描述】:

我正在配置 Mac 10.6 服务器,但在配置 MySQL 以支持 InnoDB 时遇到问题。

我的原始 my.cnf 文件启动并运行 MySQL 时没有问题。这里是:

[mysqld]
#Don't resolve hostnames. All hostnames are IP's or 'localhost'.
skip-name-resolve
#Don't give threads different priorities.
skip-thread-priority

但是,当我添加它以支持 InnoDB 时,MySQL 将无法启动。

[mysqld]
#Don't resolve hostnames. All hostnames are IP's or 'localhost'.
skip-name-resolve
#Don't give threads different priorities.
skip-thread-priority
# Uncomment the following if you are using InnoDB tables
innodb_data_home_dir=/var/mysql/
innodb_data_file_path=ibdata1:2000M;ibdata2:10M:autoextend
innodb_log_group_home_dir=/var/mysql/
innodb_log_arch_dir=/var/mysql/ 
# You can set .._buffer_pool_size up to 50 - 80 % 
# of RAM but beware of setting memory usage too high
innodb_buffer_pool_size=384M
innodb_additional_mem_pool_size=20M
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size=100M
innodb_log_buffer_size=8M
innodb_flush_log_at_trx_commit=1
innodb_lock_wait_timeout=50

我确认 /var/mysql/ 存在并且具有正确的权限。我不确定如何对 mysql 进行故障排除以了解导致问题的原因。

MySQL 位于 /usr/local/ : lrwxr-xr-x 1 根轮 24 Aug 26 12:17 mysql -> mysql-5.5.15-osx10.6-x86 drwxr-xr-x 16根轮544 7月13日16:26 mysql-5.5.15-osx10.6-x86

非常感谢您的帮助。

迈克

=========

以下是日志文件末尾的几行:

111027 14:41:07 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.15'  socket: '/tmp/mysql.sock'  port: 3306  MySQL Community Server (GPL)
111027 21:48:57 [Note] /usr/local/mysql/bin/mysqld: Normal shutdown

111027 21:48:57 [Note] Event Scheduler: Purging the queue. 0 events
111027 21:48:57  InnoDB: Starting shutdown...
111027 21:48:57  InnoDB: Shutdown completed; log sequence number 1595675
111027 21:48:57 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

111027 21:49:47 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
111027 21:49:47 [Warning] The --skip-thread-priority startup option is deprecated and will be removed in MySQL 7.0. This option has no effect as the implied behavior is already the default.
111027 21:49:47 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql/data/ is case insensitive
111027 21:49:47 [Note] Plugin 'FEDERATED' is disabled.
111027 21:49:47 InnoDB: The InnoDB memory heap is disabled
111027 21:49:47 InnoDB: Mutexes and rw_locks use GCC atomic builtins
111027 21:49:47 InnoDB: Compressed tables use zlib 1.2.3
111027 21:49:47 InnoDB: Initializing buffer pool, size = 128.0M
111027 21:49:47 InnoDB: Completed initialization of buffer pool
111027 21:49:47 InnoDB: highest supported file format is Barracuda.
111027 21:49:47  InnoDB: Waiting for the background threads to start
111027 21:49:48 InnoDB: 1.1.8 started; log sequence number 1595675
111027 21:49:48 [Warning] 'user' entry 'root@myservername.local' ignored in --skip-name-resolve mode.
111027 21:49:48 [Warning] 'user' entry '@myservername.local' ignored in --skip-name-resolve mode.
111027 21:49:48 [Warning] 'proxies_priv' entry '@ root@myservername.local' ignored in --skip-name-resolve mode.
111027 21:49:48 [Note] Event Scheduler: Loaded 0 events
111027 21:49:48 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.15'  socket: '/tmp/mysql.sock'  port: 3306  MySQL Community Server (GPL)
111027 21:53:04 [Note] /usr/local/mysql/bin/mysqld: Normal shutdown

111027 21:53:04 [Note] Event Scheduler: Purging the queue. 0 events
111027 21:53:04  InnoDB: Starting shutdown...
111027 21:53:04  InnoDB: Shutdown completed; log sequence number 1595675
111027 21:53:04 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

我不知道如何阅读。你能帮忙吗?

迈克

【问题讨论】:

  • 我将 mysql 日志文件的输出添加到我原来的问题中。

标签: mysql innodb


【解决方案1】:

您的 mysql 错误日志文件中有什么内容?这通常会告诉你为什么 mysql 不会启动。如果你不知道你的日志文件在哪里,在 mysql 中运行这个命令:

show variables like "%log_error%";

您可以跟踪该文件以查看错误所在。当然,你需要关闭 Innodb 支持,这样你才能启动 mysql 来运行上面的命令。然后你可以关闭 mysql,启用 Innodb 并尝试再次启动它。然后查看日志文件。

【讨论】:

    猜你喜欢
    • 2015-03-06
    • 1970-01-01
    • 2010-09-12
    • 1970-01-01
    • 1970-01-01
    • 2019-12-07
    • 2014-01-12
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多