mysql 数据库名怎么改呢?rename怎么不行
   还有一般连数据库是采用什么方法,是API函数去连吗?那C++,PHP他们一般是怎么连的,都是用API连吗?常规上是用哪方法呢
谢谢了

解决方案 »

  1.   

    mysql 数据库名怎么改呢?RENAME {DATABASE | SCHEMA} db_name TO new_db_name;
      

  2.   


    RENAME DATABASE 要改的数据库名 TO 改后的数据库名;
      

  3.   


    mysql> create database test1;
    Query OK, 1 row affected (0.09 sec)mysql> rename database test1 to test2;
    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
    corresponds to your MySQL server version for the right syntax to use near 'datab
    ase test1 to test2' at line 1
    mysql> rename schema test1 to test2;
    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
    corresponds to your MySQL server version for the right syntax to use near 'schem
    a test1 to test2' at line 1如上,出错。我查了下,有些版本不支持这命令。
    官方网http://dev.mysql.com/doc/refman/5.1/en/rename-database.html 里面也不建议重命令数据库。
    那这问题就这样吧谢谢楼上2位
      

  4.   

    那请教大家 连mysql一般是用什么连呢
      

  5.   

    mysql的客户端工具蛮多的,我一般使用SQLyog图形工具或者用命令行