修改密码:
use mysql;
update user set password = old_password('123') where user = 'root';

解决方案 »

  1.   

    检查一下你的phpMyadmin的设置,尤其是用户名和密码。
      

  2.   

    检查phpMyAdmin路径下的config.inc.php的配置,主要就是下面几项:$cfg['PmaAbsoluteUri'] 设置phpMyAdmin的访问路径$cfg['Servers'][$i]['host']          = 'localhost'; // MySQL hostname or IP address
    $cfg['Servers'][$i]['port']          = '';          // MySQL port - leave blank for default port
    $cfg['Servers'][$i]['socket']        = '/var/lib/mysql/mysql.sock';          // Path to the socket - leave blank for default socket,***这个必须指定mysql.sock的位置,有些mysql的配置,该文件是/tmp/mysql.sock***
    $cfg['Servers'][$i]['connect_type']  = 'socket';       // How to connect to MySQL server ('tcp' or 'socket')
    $cfg['Servers'][$i]['extension']     = 'mysql';     // The php MySQL extension to use ('mysql' or 'mysqli')$cfg['Servers'][$i]['auth_type']     = 'cookie';    // Authentication method (config, http or cookie based)?
    $cfg['Servers'][$i]['user']          = 'root';      // MySQL user
    $cfg['Servers'][$i]['password']      = '';          // MySQL password (only needed
                                                        // with 'config' auth_type)如果上述配置没有问题的话,可能你是通过phpMyAdmin来远程访问机器上的数据库,这时还要注意用户是否具有远程访问的权限,可以通过下面的语句让某一数据库用户具有远程访问的权限:
    grant all privileges on 数据库名.* to 数据库用户名@"%" identified by '密码' with grant option