用 mysql> mysql -u root;结果也是一样的,我的数据库处于初始话状态

解决方案 »

  1.   

    mysql -uroot;
    注意-u后面没有空格..
      

  2.   


    mysql> mysql -uroot;
    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 'mysq
    l -uroot' at line 1
    mysql>-----------------------
    也是一样的:(
      

  3.   

    同时:
    mysql> create database example;
    ERROR 1044 (42000): Access denied for user: ''@'localhost' to database 'example'
    这样也报错
      

  4.   

    你要先退出mysql环境啊.
    在mysql环境中怎么还用mysql来登录呢.
    所以,先要exit.
    然后再mysql -uroot;
    还有,root用户有没有设置密码呢?
      

  5.   

    这个事怎么回事?
    mysql> create database example;
    ERROR 1044 (42000): Access denied for user: ''@'localhost' to database 'example'root应该有权限做建立数据库呀