【问题标题】:mysqli_real_connect()(HY000/1130)Host 'localhost'is not allowed to connect to this MariaDB servermysqli_real_connect()(HY000/1130)Host 'localhost' is not allowed to connect to this MariaDB server
【发布时间】:2020-11-17 19:23:30
【问题描述】:

昨天我的 MySQL 工作正常。今天我尝试访问它并收到上述错误。我从这里尝试了一些建议,但没有改变。不断获取'localhost'不允许连接..... 检查 config.inc.php 文件

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

/* Bind to the localhost ipv4 address and tcp */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';

对我来说看起来不错,但我只是一个初学者

下面的错误日志对我来说毫无意义

    2020-07-27 19:33:45 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2020-07-27 19:33:46 0 [Note] InnoDB: Uses event mutexes
2020-07-27 19:33:46 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-07-27 19:33:46 0 [Note] InnoDB: Number of pools: 1
2020-07-27 19:33:46 0 [Note] InnoDB: Using SSE2 crc32 instructions
2020-07-27 19:33:46 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2020-07-27 19:33:46 0 [Note] InnoDB: Completed initialization of buffer pool
2020-07-27 19:33:46 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=17995039
2020-07-27 19:33:46 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-07-27 19:33:46 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2020-07-27 19:33:46 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-07-27 19:33:46 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-07-27 19:33:46 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2020-07-27 19:33:46 0 [Note] InnoDB: 10.3.16 started; log sequence number 17995048; transaction id 2579
2020-07-27 19:33:46 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2020-07-27 19:33:46 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-07-27 19:33:46 0 [Note] Server socket created on IP: '::'.
2020-07-27 19:33:47 0 [ERROR] mysqld.exe: Table 'user' is marked as crashed and should be repaired
2020-07-27 19:33:48 0 [Note] InnoDB: Buffer pool(s) load completed at 200727 19:33:48
2020-07-27 19:33:48 0 [Note] Reading of all Master_info entries succeeded
2020-07-27 19:33:48 0 [Note] Added new Master_info '' to hash table
2020-07-27 19:33:48 0 [Note] mysql\bin\mysqld.exe: ready for connections.
Version: '10.3.16-MariaDB'  socket: ''  port: 3306  mariadb.org binary distribution
2020-07-27 19:36:55 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable
2020-07-27 19:36:55 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable
2020-07-27 19:36:55 0 [ERROR] Plugin 'InnoDB' init function returned error.
2020-07-27 19:36:55 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2020-07-27 19:36:55 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-07-27 19:36:55 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2020-07-27 19:36:55 0 [ERROR] Aborting

感谢您提供任何信息。

【问题讨论】:

  • 首先尝试运行以下命令:mysqlcheck -u root -p --auto-repair --check --all-databases

标签: mysql mariadb


【解决方案1】:
[ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable

这意味着您在安装 MySQL 时不是“root”。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-10-06
    • 2012-07-15
    • 2018-02-16
    • 2017-12-05
    • 2021-02-04
    • 2020-08-27
    • 2016-06-20
    • 1970-01-01
    相关资源
    最近更新 更多