# Example MySQL config file for small systems. # # This is for a system with little memory (32M - 64M) where MySQL is only used # from time to time and it's important that the mysqld daemon # doesn't use much resources. # # You can copy this file to # D:/mysql/server-5.1/my.ini to set global options, # mysql/data/my.cnf to set server-specific options (in this # installation this directory does not exist). # The MySQL server [mysqld] port=3306 basedir=D:/mysql/server-5.1 datadir=D:/mysql/data character-set-server=utf8 # The minimum number of diskspace in kB that the backup function can export myisam_data_pointer_size=4
上述代码展示了一份典型的MySQL 5.1 my.ini配置文件,其中
- port指定了MySQL服务器的监听端口,默认为3306;
- basedir指定了MySQL的安装路径;
- datadir指定了MySQL的数据目录;
- character-set-server指定了MySQL的字符集为utf8;
- myisam_data_pointer_size指定了MyISAM表备份函数所使用的最小磁盘空间。
当大家需要更改MySQL配置时,就需要修改my.ini文件中的一些配置项。需要注意的是,当大家修改my.ini的某些配置项时,应该谨慎处理,避免配置不当造成MySQL服务器出现问题。