大家好,我在创建索引时,出现错误提示,代码如下: create uique index stu_cou_index on student_info.results (student_id, course_id); 
show index from student_info.results; 保存为index.sql,然后运行,出现错误: 
mysql> c:\wamp\www\index.sql 
      show warnings disabled. 
      show warnings disabled. 
      error: 
      unknown command '\i' 
      -> 并且没有办法回到mysql>的提示符状态,只能关闭mysql运行台,再从新进入 
谢谢各位大虾,帮我看看。。 

解决方案 »

  1.   

    注意你命令行的书写,最好转义\号,
    mysql > c:\\wamp\\www\\index.sql
    或者
    mysql > c:/wamp/www/index.sql
      

  2.   

    create unique index stu_cou_index on student_info.results (student_id, course_id); 
      

  3.   

    谢谢3楼的及时回复,但是改了还是不行,还是出现错误提示
    mysql> c:\wamp\www\index.sql 
          show warnings disabled. 
          show warnings disabled. 
          error: 
          unknown command '\i' 
          -> 并且没有办法回到mysql>的提示符状态,只能关闭mysql运行台,再从新进入 
      

  4.   

    回到mysql>提示符状态:输入分号即可。
    source c:\wamp\www\index.sql