2

我在 Windows 7 笔记本电脑上的 MySQL 5.7.6 上安装了一个新实例。

我需要在其上启用 FEDERATED Engine。

在我添加的 [mysqld] 部分中FEDERATED

但是当我尝试启动服务器时出现错误。

这是 mysql 错误日志显示--FEDERATED的未知选项

MySQL文档中的注释

如果从源代码构建 MySQL,要包含 FEDERATED 存储引擎,请使用 -DWITH_FEDERATED_STORAGE_ENGINE 选项调用 CMake。

如何在 Windows 上使用 -DWITH_FEDERATED_STORAGE_ENGIN 进行 CMake?

这是来自 MySQL 错误文件的错误

2015-10-27T04:15:47.031678Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-10-27T04:15:47.031678Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2015-10-27T04:15:47.034678Z 0 [Note] C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe (mysqld 5.7.9-log) starting as process 5780 ...
2015-10-27T04:15:47.046679Z 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2015-10-27T04:15:47.047679Z 0 [Note] InnoDB: Uses event mutexes
2015-10-27T04:15:47.048680Z 0 [Note] InnoDB: _mm_lfence() and _mm_sfence() are used for memory barrier
2015-10-27T04:15:47.049680Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-10-27T04:15:47.049680Z 0 [Note] InnoDB: Adjusting innodb_buffer_pool_instances from 8 to 1 since innodb_buffer_pool_size is less than 1024 MiB
2015-10-27T04:15:47.051680Z 0 [Note] InnoDB: Number of pools: 1
2015-10-27T04:15:47.052680Z 0 [Note] InnoDB: Not using CPU crc32 instructions
2015-10-27T04:15:47.089684Z 0 [Note] InnoDB: Initializing buffer pool, total size = 8M, instances = 1, chunk size = 8M
2015-10-27T04:15:47.092684Z 0 [Note] InnoDB: Completed initialization of buffer pool
2015-10-27T04:15:47.220697Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2015-10-27T04:15:47.373712Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2015-10-27T04:15:47.374712Z 0 [Note] InnoDB: Setting file '.\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2015-10-27T04:15:47.533728Z 0 [Note] InnoDB: File '.\ibtmp1' size is now 12 MB.
2015-10-27T04:15:47.541729Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2015-10-27T04:15:47.543729Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2015-10-27T04:15:47.546729Z 0 [Note] InnoDB: Waiting for purge to start
2015-10-27T04:15:47.597734Z 0 [Note] InnoDB: 5.7.9 started; log sequence number 2472339
2015-10-27T04:15:47.600735Z 0 [Note] InnoDB: Loading buffer pool(s) from C:\ProgramData\MySQL\MySQL Server 5.7\Data\ib_buffer_pool
2015-10-27T04:15:47.600735Z 0 [Note] Plugin 'FEDERATED' is disabled.
2015-10-27T04:15:47.600735Z 0 [Note] InnoDB: not started
2015-10-27T04:15:47.616736Z 0 [ERROR] unknown option '--FEDERATED'
2015-10-27T04:15:47.617736Z 0 [ERROR] Aborting

2015-10-27T04:15:47.618737Z 0 [Note] Binlog end
2015-10-27T04:15:47.620737Z 0 [Note] Shutting down plugin 'ngram'
2015-10-27T04:15:47.621737Z 0 [Note] Shutting down plugin 'partition'
2015-10-27T04:15:47.623737Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2015-10-27T04:15:47.624737Z 0 [Note] Shutting down plugin 'ARCHIVE'
2015-10-27T04:15:47.625737Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2015-10-27T04:15:47.627737Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
2015-10-27T04:15:47.629738Z 0 [Note] Shutting down plugin 'MyISAM'
2015-10-27T04:15:47.630738Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
2015-10-27T04:15:47.631738Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2015-10-27T04:15:47.632738Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2015-10-27T04:15:47.635738Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2015-10-27T04:15:47.636738Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2015-10-27T04:15:47.637738Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2015-10-27T04:15:47.638739Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2015-10-27T04:15:47.639739Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2015-10-27T04:15:47.640739Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2015-10-27T04:15:47.641739Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2015-10-27T04:15:47.642739Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2015-10-27T04:15:47.643739Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2015-10-27T04:15:47.644739Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2015-10-27T04:15:47.645739Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2015-10-27T04:15:47.646739Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2015-10-27T04:15:47.647739Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2015-10-27T04:15:47.647739Z 0 [Note] InnoDB: Buffer pool(s) load completed at 151026 21:15:47
2015-10-27T04:15:47.648740Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
2015-10-27T04:15:47.649740Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
2015-10-27T04:15:47.650740Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2015-10-27T04:15:47.651740Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2015-10-27T04:15:47.652740Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2015-10-27T04:15:47.653740Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2015-10-27T04:15:47.654740Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2015-10-27T04:15:47.654740Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2015-10-27T04:15:47.655740Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
2015-10-27T04:15:47.656740Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2015-10-27T04:15:47.657740Z 0 [Note] Shutting down plugin 'INNODB_CMP'
2015-10-27T04:15:47.658741Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2015-10-27T04:15:47.658741Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
2015-10-27T04:15:47.659741Z 0 [Note] Shutting down plugin 'INNODB_TRX'
2015-10-27T04:15:47.660741Z 0 [Note] Shutting down plugin 'InnoDB'
2015-10-27T04:15:47.661741Z 0 [Note] InnoDB: FTS optimize thread exiting.
2015-10-27T04:15:47.662741Z 0 [Note] InnoDB: Starting shutdown...
2015-10-27T04:15:47.763751Z 0 [Note] InnoDB: Dumping buffer pool(s) to C:\ProgramData\MySQL\MySQL Server 5.7\Data\ib_buffer_pool
2015-10-27T04:15:47.779753Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 151026 21:15:47
2015-10-27T04:15:49.017876Z 0 [Note] InnoDB: Shutdown completed; log sequence number 2472358
2015-10-27T04:15:49.018877Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2015-10-27T04:15:49.019877Z 0 [Note] Shutting down plugin 'MEMORY'
2015-10-27T04:15:49.020877Z 0 [Note] Shutting down plugin 'CSV'
2015-10-27T04:15:49.020877Z 0 [Note] Shutting down plugin 'sha256_password'
2015-10-27T04:15:49.021877Z 0 [Note] Shutting down plugin 'mysql_native_password'
2015-10-27T04:15:49.022877Z 0 [Note] Shutting down plugin 'binlog'
2015-10-27T04:15:49.023877Z 0 [Note] C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe: Shutdown complete
4

2 回答 2

2

我想到了。

FEDERATED应该federated在 my.ini 文件中。

于 2015-10-27T14:37:40.777 回答
0

我最近帮助我的同事启用此功能,

他在 Windows 7 中使用 wamp,

你应该小心my.ini文件。

你可能会看到这样的一行:

# The MySQL server
[wampmysqld]
port        = 3306
socket      = /tmp/mysql.sock
key_buffer_size = 16M
max_allowed_packet = 1M
sort_buffer_size = 512K
net_buffer_length = 8K

您应该必须在上面添加它才能启用federeted

# Here follows entries for some specific programs
[mysqld]
federated

你的最终结果可能是这样的:

    # Here follows entries for some specific programs
    [mysqld]
    federated
    # The MySQL server
    [wampmysqld]
    port        = 3306
    socket      = /tmp/mysql.sock
    key_buffer_size = 16M
    max_allowed_packet = 1M
    sort_buffer_size = 512K
    net_buffer_length = 8K
    read_buffer_size = 256K
    read_rnd_buffer_size = 512K
    myisam_sort_buffer_size = 8M
    basedir=c:/wamp/bin/mysql/mysql5.6.17
    log-error=c:/wamp/logs/mysql.log
    datadir=c:/wamp/bin/mysql/mysql5.6.17/data

最后,您必须重新启动服务。

我希望这会有所帮助。

于 2017-07-10T21:33:18.237 回答