创建一个数据库为什么会失败?
少了一个e,像这样create database mysqldemo;

解决方案 »

  1.   

    Microsoft Windows 2000 [Version 5.00.2195]
    (C) 版权所有 1985-2000 Microsoft Corp.C:\Documents and Settings\lenovo>cd\C:\>mysql
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 16 to server version: 4.0.21-ntType 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql> create database mysqldemo;
    ERROR 1044: Access denied for user: '@localhost' to database 'mysqldemo'
    mysql>
    又出现了这个错误?望楼上的再指点一下
      

  2.   

    Microsoft Windows 2000 [Version 5.00.2195]
    (C) 版权所有 1985-2000 Microsoft Corp.C:\Documents and Settings\lenovo>cd\C:\>mysql
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 6 to server version: 4.0.21-ntType 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql> show database;
    ERROR 1064: You have an error in your SQL syntax.  Check the manual that corresp
    onds to your MySQL server version for the right syntax to use near 'database' at
     line 1
    mysql>
    是不是我的版本装的有问题?
      

  3.   

    你没有访问权限,MYSQL在默认下是没有CREATE等权限的,你要改一下
    建议你下载一个Mysql center control,是图形界面,在@localhost中修改权限,应该就可以了
      

  4.   

    我在Mysql center control中修改了@localhost中的权限,拥有所有权利。可是在DOS下还是不能建表,不过在Mysql center control中可以建表,并且也存储在\mysql\data中。有什么问题?
      

  5.   

    你不要直接这么登陆:
    C:\>mysql这和版本没什么关系的
    我直接C:\>mysql 后也不能建库后来这样:用root登录C:\mysql\bin>mysql -hlocalhost -uroot -p
    Enter password:********
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 2 to server version: 4.0.21-ntType 'help;' or '\h' for help. Type '\c' to clear the buffer.这样就可以
    mysql> create database mysqldemo;
    Query OK, 1 row affected (0.03 sec)
      

  6.   

    我直接用mysql 后也是出现你那种情况C:\mysql\bin>mysql
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 1 to server version: 4.0.21-ntType 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql> create database mysqldemo;
    ERROR 1044: Access denied for user: '@localhost' to database 'mysqldemo'