使用GRANT ALL ON后无法访问phpmyadmin

时间:2019-07-18 03:29:32

标签: mysql database apache phpmyadmin xampp

我最近在运行代码后无法访问PHPMyAdmin

CREATE DATABASE misc;
GRANT ALL ON misc.* TO 'root'@'localhost' IDENTIFIED BY 'root';
GRANT ALL ON misc.* TO 'root'@'127.0.0.1' IDENTIFIED BY 'root';

我正在使用xampp,PHPMyAdmin显示的错误警告为:

Error
MySQL said: Documentation

Cannot connect: invalid settings.

mysqli_real_connect(): (HY000/1130): Host 'localhost' is not allowed to connect to this MariaDB server

Connection for controluser as defined in your configuration failed.

mysqli_real_connect(): (HY000/1130): Host 'localhost' is not allowed to connect to this MariaDB server

phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.

screeshot

我的config.inc.php

/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
//$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'root';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';

我尝试将密码设置为root且为空,但均无效

新更新

mysql错误日志

2019-07-18  0:07:58 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2019-07-18  0:07:58 0 [Note] InnoDB: Uses event mutexes
2019-07-18  0:07:58 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-07-18  0:07:58 0 [Note] InnoDB: Number of pools: 1
2019-07-18  0:07:58 0 [Note] InnoDB: Using SSE2 crc32 instructions
2019-07-18  0:07:58 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2019-07-18  0:07:58 0 [Note] InnoDB: Completed initialization of buffer pool
2019-07-18  0:07:58 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=2381403
2019-07-18  0:07:58 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2019-07-18  0:07:58 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2019-07-18  0:07:58 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2019-07-18  0:07:58 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2019-07-18  0:07:58 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2019-07-18  0:07:58 0 [Note] InnoDB: Waiting for purge to start
2019-07-18  0:07:58 0 [Note] InnoDB: 10.3.16 started; log sequence number 2381412; transaction id 1055
2019-07-18  0:07:58 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2019-07-18  0:07:58 0 [Note] Plugin 'FEEDBACK' is disabled.
2019-07-18  0:07:58 0 [Note] InnoDB: Buffer pool(s) load completed at 190718  0:07:58
2019-07-18  0:07:58 0 [Note] Server socket created on IP: '::'.

0 个答案:

没有答案