MySQL Variables init_file 数据库 参数变量解释及正确配置使用
本站中文解释
init_file参数变量用于指定MySQL服务器启动时要执行的初始化文件的位置。要设置init_file参数变量,请在my.cnf文件中找到[mysqld]段,可以在其中添加init_file参数变量,然后把要执行的文件位置作为参数值:
[mysqld]
init_file=/home//scripts/my_init_file.sql
官方英文解释
init_file
Command-Line Format | --init-file=file_name |
---|---|
System Variable | init_file |
Scope | Global |
Dynamic | No |
Type | File name |
If specified, this variable names a file containing SQL
statements to be read and executed during the startup process.
Each statement must be on a single line and should not include
comments.
If the server is started with any of the
--bootstrap
,
--initialize
, or
--initialize-insecure
options,
it operates in bootstap mode and some functionality is
unavailable that limits the statements permitted in the file.
These include statements that relate to account management
(such as CREATE USER
or
GRANT
), replication, and global
transaction identifiers. See
Section 16.1.3, “Replication with Global Transaction Identifiers”.