create table memory_table(
 id int ,
 name varchar(20)
)engine=memory;当我建立一个内存表的时候,我想启动mysqld的时候自动把另一个表的数据全部加载到这个内存表里面去。。请问这个怎么实现。。

解决方案 »

  1.   

    MYSQL 有类似JOB的东西么?
      

  2.   

    可以用contab定时调用,单是貌似没有像sqlserver那样的在agent服务启动时执行作业
      

  3.   

    配置参数
    init-file=file_name Read SQL statements from this file at startup. Each statement must be on a single line and should not include comments. http://dev.mysql.com/doc/refman/5.1/en/server-options.html#option_mysqld_init-file
      

  4.   

    filename可以很简单
    insert into memory_table select * from your_table;
      

  5.   

    配置参数
    init-file=file_name这是加载某个磁盘文件吧.我想加载某个表的.
      

  6.   

    MEMORY存储引擎中的记录你需要自己手工加载。 保存时也是一样。