php - 表格每一行的非法字符串偏移量 'Data_length'/'Index_length'

标签 php html mysql

学习 PHP/mySQL 等,当我使用 xampp 使用 phpmyadmin 创建表时,每一行都会出现此错误:

Warning in .\libraries\classes\Controllers\Table\TableStructureController.php#1339 Illegal string offset 'Data_length'

Backtrace

.\libraries\classes\Controllers\Table\TableStructureController.php#1278: PhpMyAdmin\Controllers\Table\TableStructureController->getTableStats() .\libraries\classes\Controllers\Table\TableStructureController.php#377: PhpMyAdmin\Controllers\Table\TableStructureController->displayStructure( array, array, array, , array, array, ) .\tbl_structure.php#57: PhpMyAdmin\Controllers\Table\TableStructureController->indexAction() Warning in .\libraries\classes\Controllers\Table\TableStructureController.php#1342 Illegal string offset 'Index_length' Backtrace

.\libraries\classes\Controllers\Table\TableStructureController.php#1278: PhpMyAdmin\Controllers\Table\TableStructureController->getTableStats() .\libraries\classes\Controllers\Table\TableStructureController.php#377: PhpMyAdmin\Controllers\Table\TableStructureController->displayStructure( array, array, array, , array, array, ) .\tbl_structure.php#57: PhpMyAdmin\Controllers\Table\TableStructureController->indexAction()

我似乎无法弄清楚,每当我尝试创建表时都会发生这种情况。 我的表看起来像这样:

enter image description here

最佳答案

执行以下步骤:

  1. 打开你的 MySQL 配置文件:[drive]\xampp\mysql\bin\my.ini

    在 XAMMP 面板的 MySQL 行 > config > my.ini

  2. 查找:# MySQL 服务器 [mysqld]

  3. 在其正下方添加:lower_case_table_names = 2
  4. 保存文件并重启MySQL服务

关于php - 表格每一行的非法字符串偏移量 'Data_length'/'Index_length',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55277978/

相关文章:

PHP 在列表中查找数字的最有效方法

php - Alamofire 不发布到 PHP 脚本

html - CSS Positioning div on top with z-index

MySQL 从另一个表连接和 COUNT(*)

javascript - 当页面已打开时锁定页面

php - Zend 1 - SQL FROM 表达式别名

html - 为什么我不能在 mix-blend-mode 之后应用 css 过滤器?

javascript - "button"的 HTML 输入类型几乎只在页面刷新后触发

php - fetch_assoc() 查询问题

mysql - 了解MySQL的慢查询日志格式