mysql -h localhost -u root 就行了,

解决方案 »

  1.   

    呵呵
    这样你登录后就是拥有了超级用户权限,要改密码还不容易吗??
    http://www.mysql.com/doc/en/GRANT.html
    http://www.mysql.com/doc/en/Secure_GRANT.html
      

  2.   

    shell> mysql -u root mysql
    mysql> UPDATE user SET Password=PASSWORD('new_password')
           WHERE user='root';也可以这样
    shell> mysql -u root mysql
    mysql> SET PASSWORD FOR root=PASSWORD('new_password');这样也行shell> mysqladmin -u root password new_password ;
      

  3.   

    你改一下mysql.ini里面的选项也可以的!不过要重新启动一下!呵呵