1. 文件个格式my.ini
可以就直接复制
[mysql]
# 设置mysql客户端默认字符集
default-character-set=utf8
[mysqld]
# 设置3306端口
port = 3306
# 设置mysql的安装目录
basedir="C:/Program Files/MySQL/MySQL Server 5.5/"
datadir="C:/Program Files/MySQL/MySQL Server 5.5/data"
default-storage-engine=MYISAM
#ERROR 1290 (HY000): The MySQL server is running with the –secure-file-priv option so it cannot execute this statement. 这时在执行配置文件的时候添加
//secure-file-priv="C:/ProgramData/MySQL/MySQL Server 5.5/Uploads/"
#支持 INNODB 引擎模式。修改为 default-storage-engine=INNODB 即可。
#如果 INNODB 模式如果不能启动,删除data目录下ib开头的日志文件重新启动。
sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
max_connections=512
query_cache_size=0
table_cache=256
tmp_table_size=18M
thread_cache_size=8
myisam_max_sort_file_size=64G
myisam_sort_buffer_size=35M
key_buffer_size=25M
read_buffer_size=64K
read_rnd_buffer_size=256K
sort_buffer_size=256K
innodb_additional_mem_pool_size=2M
innodb_flush_log_at_trx_commit=1
innodb_log_buffer_size=1M
innodb_buffer_pool_size=47M
innodb_log_file_size=24M
innodb_thread_concurrency=8
2.如何执行配置文件
实在 cmd上执行这个指令
bin文件 +mysqld --install MySQL --default -flie=+配置文件【C:\Program Files\MySQL\MySQL Server 5.5\bin mysqld --install MySQL -default -flie=C:\Program Files\MySQL\MySQL Server 5.5\my.ini】
3.执行配置文件出現的問題
A.ERROR 1290 (HY000): The MySQL server is running with the –secure-file-priv option so it cannot execute this statement.
步骤1.进入mysql
步骤2.show variables like '%secure%';
步骤3.配置文件添加secure-file-priv="C:/ProgramData/MySQL/MySQL Server 5.7/Uploads"
再次执行配置文件即可