开发者

saving MySQL settings

how can i save permanently settings of MySQL ?开发者_开发百科

i got MySQL from WAMP, and there is no my.cnf file, there is a my.ini file !

how can i set some global variable,


Drive:\wamp\bin\mysql\mysql5.5.8\my.ini

this is the place to save settings.


WAMP uses the my.ini file.

To get to your my.ini file, just click the WAMP tray icon and hover over the 'MySQL' menu, and click 'my.ini'.

  1. Edit your my.ini file and under the [mysqld] section, add this:

    setting-name=setting-value , example: event-scheduler=on

  2. restart all services

You do not need to use quotes around either the setting or value.


Global system variables must be specified using the command line or SQL commands (runtime/session) or by configuration file (permanent).


I have had the same question because in WAMP we only have a my.ini file instead of my.conf.

Through a SQL statement, proceeded as follow:

mysql> SET global max_heap_table_size=524288000;
mysql> SET global tmp_table_size=524288000;

but when restarted the server, the query:

select @@global.tmp_table_size, @@global.max_heap_table_size

returned the old values by default.

Then edited my.ini file ading the following statements:

max_heap_table_size=524288000
tmp_table_size=524288000

and the changes were permanent.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜