› MySQL 5.5 Community Server
› MySQL 5.6 Community Server
› Percona Configuration Wizard
› XtraBackup 搭建主从复制
Great Sites on MySQL
› Percona
› MySQL Performance Blog
› Severalnines
推荐管理工具
› Sequel Pro
› phpMyAdmin
推荐书目
› MySQL Cookbook
MySQL 相关项目
› MariaDB
› Drizzle
参考文档
› http://mysql-python.sourceforge.net/MySQLdb.html
rateltalk
V2EX  ›  MySQL

Mysql 5.7.26 新增表列失败后提示表不存在了

  •  
  •   rateltalk ·
    shangdev · Jan 25, 2024 · 2069 views
    This topic created in 974 days ago, the information mentioned may be changed or developed.
    使用 Navicat 新增了 2 列,但是失败了,现在在视图里找不到这个表了,且 select 这张表时也提示 table 不存在。。。

    但是通过命令行进入 mysql 后,show tables 还能显示这张表,以及在 mysql 数据库目录下也能找到这张表( frm,ibd 文件都在)。

    检查 mysql 错误日志发现这行:
    ```
    Table xx contains 33 user defined columns in InnoDB, but 31 columns in MySQL. Please check INFORMATION_SCHEMA.INNODB_SYS_COLUMNS
    ```

    请教下这种情况如何恢复啊?
    2 replies  •  2024-01-25 16:56:16 +08:00
    jay2049
        1
    jay2049  
       Jan 25, 2024
    命令行用 alter table 把你新增的列删了试试。
    rateltalk
        2
    rateltalk  
    OP
       Jan 25, 2024
    @jay2049 #1 还是提示:Table 'xx' doesn't exist ,我查 information.tables 时,这张表已经不在里边了。。

    猜测是 information.tables 里不存在,但实际数量还在。。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1084 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 23:43 · PVG 07:43 · LAX 16:43 · JFK 19:43
    ♥ Do have faith in what you're doing.