weixin_42124124
weixin_42124124
2018-12-04 15:20

PHPmyadmin登录错误:#2054 无法登录 MySQL 服务器

10
  • php
  • mysql
  • wampserber2.5

我快炸裂了,网上能找到的方法我都试过了,都没有用,附上我的配置
/**

  • MySQL hostname or IP address *
  • @global string $cfg['Servers'][$i]['host'] */ $cfg['Servers'][$i]['host'] = '127.0.0.1';

/**

  • MySQL port - leave blank for default port *
  • @global string $cfg['Servers'][$i]['port'] */ $cfg['Servers'][$i]['port'] = '';

/**

  • Path to the socket - leave blank for default socket *
  • @global string $cfg['Servers'][$i]['socket'] */ $cfg['Servers'][$i]['socket'] = '';

/**

  • Use SSL for connecting to MySQL server? *
  • @global boolean $cfg['Servers'][$i]['ssl'] */ $cfg['Servers'][$i]['ssl'] = false;

/**

  • Path to the key file when using SSL for connecting to the MySQL server *
  • @global string $cfg['Servers'][$i]['ssl_key'] */ $cfg['Servers'][$i]['ssl_key'] = null;

/**

  • Path to the cert file when using SSL for connecting to the MySQL server *
  • @global string $cfg['Servers'][$i]['ssl_cert'] */ $cfg['Servers'][$i]['ssl_cert'] = null;

/**

  • Path to the CA file when using SSL for connecting to the MySQL server *
  • @global string $cfg['Servers'][$i]['ssl_ca'] */ $cfg['Servers'][$i]['ssl_ca'] = null;

/**

  • Directory containing trusted SSL CA certificates in PEM format *
  • @global string $cfg['Servers'][$i]['ssl_ca_path'] */ $cfg['Servers'][$i]['ssl_ca_path'] = null;

/**

  • List of allowable ciphers for SSL connections to the MySQL server *
  • @global string $cfg['Servers'][$i]['ssl_ciphers'] */ $cfg['Servers'][$i]['ssl_ciphers'] = null;

/**

  • MySQL 5.6 or later triggers the mysqlnd driver in PHP to validate the
  • peer_name of the SSL certifcate
  • For most self-signed certificates this is a problem. Setting this to false
  • will disable the check and allow the connection (PHP 5.6.16 or later) *
  • @link https://bugs.php.net/68344
  • @global string $cfg['Servers'][$i]['ssl_verify'] */ $cfg['Servers'][$i]['ssl_verify'] = true;

/**

  • Use compressed protocol for the MySQL connection *
  • @global boolean $cfg['Servers'][$i]['compress'] */ $cfg['Servers'][$i]['compress'] = false;

/**

  • MySQL control host. This permits to use a host different than the
  • main host, for the phpMyAdmin configuration storage. If left empty,
  • $cfg['Servers'][$i]['host'] is used instead. *
  • @global string $cfg['Servers'][$i]['controlhost'] */ $cfg['Servers'][$i]['controlhost'] = '';

/**

  • MySQL control port. This permits to use a port different than the
  • main port, for the phpMyAdmin configuration storage. If left empty,
  • $cfg['Servers'][$i]['port'] is used instead. *
  • @global string $cfg['Servers'][$i]['controlport'] */ $cfg['Servers'][$i]['controlport'] = '';

/**

  • MySQL control user settings (this user must have read-only
  • access to the "mysql/user" and "mysql/db" tables). The controluser is also
  • used for all relational features (pmadb) *
  • @global string $cfg['Servers'][$i]['controluser'] */ $cfg['Servers'][$i]['controluser'] = '';

/**

  • MySQL control user settings (this user must have read-only
  • access to the "mysql/user" and "mysql/db" tables). The controluser is also
  • used for all relational features (pmadb) *
  • @global string $cfg['Servers'][$i]['controlpass'] */ $cfg['Servers'][$i]['controlpass'] = '';

/**

  • Authentication method (valid choices: config, http, signon or cookie) *
  • @global string $cfg['Servers'][$i]['auth_type'] */ $cfg['Servers'][$i]['auth_type'] = 'cookie';

/**

  • MySQL user *
  • @global string $cfg['Servers'][$i]['user'] */ $cfg['Servers'][$i]['user'] = 'root';

/**

  • MySQL password (only needed with 'config' auth_type) *
  • @global string $cfg['Servers'][$i]['password'] / $cfg['Servers'][$i]['password'] = '123456'; --------------------------------------------------- *
  • whether to allow root login *
  • @global boolean $cfg['Servers'][$i]['AllowRoot'] */ $cfg['Servers'][$i]['AllowRoot'] = true;

/**

  • whether to allow login of any user without a password *
  • @global boolean $cfg['Servers'][$i]['AllowNoPassword'] */ $cfg['Servers'][$i]['AllowNoPassword'] = true; ----------------------------------------------------- 给带哥们磕头了,砰砰砰
  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

4条回答