解决mysqldump备份报错: Couldn't execute 'SHOW FIELDS FROM Unknown error 1356

服务器环境:

  1. [[email protected] mysql]# cat /etc/redhat-release
    CentOS Linux release 7.3.1611 (Core)
    [[email protected] mysql]# uname -a
    Linux localhost.localdomain 3.10.0-514.21.1.el7.x86_64 #1 SMP Thu May 25 17:04:51 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
    [[email protected] mysql]# CentOS Linux release 7.3.1611 (Core)

MySQL版本号:

mysql> select version();
+------------+
| version()  |
+------------+
| 5.7.13-log |
+------------+
1 row in set (0.00 sec)

报错具体情况:

  1. [[email protected] tmp]# mysqldump -uroot -p --default-character-set=utf8  --triggers -R --hex-blob --flush-logs  --events --single-transaction  --master-data=2  --all-databases|gzip >/tmp/134-20170831.sql.gz  
    Enter password:
    mysqldump: Couldn‘t execute ‘SHOW FIELDS FROM `v_product_info`‘: Unknown error 1356 (1356)

之前,由于数据库作主要用于测试,数据量不大,所以直接用的是mysqldump备份,没有出过问题。今天根据报错提示,是`v_product_info`这个视图出了问题;

下面排查问题所在:

  1. mysql> select * from information_schema.tables where TABLE_NAME LIKE ‘%v_product_info%‘ AND table_type=‘view‘\G;

    mysql> USE POSEIDON;

    mysql> SHOW CREATE  VIEW v_product_info\G;

  2. 下面为视图内容:
    CREATE ALGORITHM = UNDEFINED DEFINER = `dev_oheimdall_user`@`%` SQL SECURITY DEFINER VIEW `v_product_info` AS SELECT
        `a`.`id` AS `id`,
        `a`.`product_name` AS `product_name`,
        `a`.`feechannel_name` AS `feechannel_name`,
        `d`.`branch` AS `branch`,
        `a`.`product_city` AS `product_city`,
        `a`.`product_type` AS `product_type`,
        `a`.`mortgage_lend_terms` AS `mortgage_lend_terms`,
        `c`.`sparehouse_require` AS `sparehouse_require`,
        `a`.`lend_time_start` AS `lend_time_start`,
        `a`.`lend_time_end` AS `lend_time_end`,
        `a`.`month_rate_start` AS `month_rate_start`,
        `a`.`month_rate_end` AS `month_rate_end`,
        `a`.`repayment_mode` AS `repayment_mode`,
        `a`.`gmt_create` AS `gmt_create`,
        `a`.`status_name` AS `status_name`,
        `a`.`creater` AS `creater`,
        (
            CASE
            WHEN (
                `a`.`id` = `b`.`product_basic_id`
            ) THEN
                `b`.`credit`
            WHEN (
                `a`.`id` = `c`.`product_basic_id`
            ) THEN
                `c`.`credit_require`
            END
        ) AS `credit`
    FROM
        (
            (
                (
                    `product_basic` `a`
                    LEFT JOIN `product_credit_admit` `b` ON (
                        (
                            `a`.`id` = `b`.`product_basic_id`
                        )
                    )
                )
                LEFT JOIN `product_mortgage_admit` `c` ON (
                    (
                        `a`.`id` = `c`.`product_basic_id`
                    )
                )
            )
            LEFT JOIN `fund_channel` `d` ON (
                (
                    `a`.`feechannel_id` = `d`.`id`
                )
            )
        )

解决问题办法:

  1. 处理办法:
    mysql> DESC product_basic;
    ERROR 1146 (42S02): Unknown error 1146
    mysql> DESC product_mortgage_admit;
    ERROR 1146 (42S02): Unknown error 1146
    mysql> DROP VIEW v_product_info;
    Query OK, 0 rows affected (0.10 sec)

然后再进行备份,发现很快顺利完成。

解决mysqldump备份报错: Couldn't execute 'SHOW FIELDS FROM Unknown error 1356

时间: 2024-11-03 22:45:26

解决mysqldump备份报错: Couldn't execute 'SHOW FIELDS FROM Unknown error 1356的相关文章

mysqldump备份报错

windows环境下的mysql 执行备份:确定用户和密码是正确的 mysqldump -uroot123 -p --default-character-set=utf8 -d lm_dyd > lm.sql 报错:mysqldump: Got error: 1044: Access denied for user 'root123'@'%' to data base 'lm_dyd' when using LOCK TABLES 解决方法:加参数 --skip-lock-tables mysq

mysql5.6版本备份报错

MySQL5.6版本备份报错,密码不安全 [[email protected] mysql]# mysqldump -uroot -ppassword cz-office > mysql38.sqlWarning: Using a password on the command line interface can be insecure. 解决方法1:进行交互式输入密码, [[email protected] mysql]# mysqldump -uroot -p cz-office > m

针对CSV备份报错,Event ID:8194,Source:VSS

平台:Windows server 2012 卷类别:CSV(cluster shared volume) 存储:DELL equalogic PS 6100 软体:HIT 现象:针对CSV进行备份的时候,调用Microsoft的VSS能备份成功,但是不能调用DELL equalogic的VSS来备份,且Windows不断报以下错误:VSS 8194 经多放资料查证,本VSS报错与备份无关(Microsoft和赛门铁克都有资料说明),但是此报错看着很烦,而且过多,容易覆盖掉其他Error,解决该

RMAN备份报错

 此文档为亲自手动整理有错误请大家提出(邮箱:[email protected]) 1.1.1RMAN备份报错 1.1.1.1 问题及现象 channelORA_DISK_1: starting piece 1 at 05-MAY-15 RMAN-00571:=========================================================== RMAN-00569:=============== ERROR MESSAGE STACK FOLLOWS ===

DP备份报错 ORA-19554: error allocating device, device type: SBT_TAPE ORA-27211

环境:solaris 10,oracle 11.2.0.4  2nodes rac 症状:rman备份报错如下 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: ======================================

fetch 报错 Failed to execute 'fetch' on 'Window': Request with GET/HEAD method cannot have body.

TypeError: Failed to execute 'fetch' on 'Window': Request with GET/HEAD method cannot have body. 在"窗口"上执行"取"失败:GET / get方法的请求不能有正文. GET requests can't have a request body, you can't make them have one. GET requests only retrieve data,

解决JVM启动报错:Unrecognized VM option '+HeapDumpOnOutOfMemeryError'

今天再搞一些OutOfMemery的相关知识探索,我想在JVM遇到OOM错误的时候,能够打印出heap dump,以便事后用Eclipse Memory Analyzer Tool(MAT)等内存分析工具分析内存的占用情况.我使用了JDK1.6.0_37和JDK1.7.0_60版本进行试验,到网上找了下,知道-XX:+HeapDumpOnOutOfMemoryError可以让JVM在探测到内存OOM的时候打印dump.但是在JVM启动参数添加这个参数的时候,JVM启动失败: Unrecogniz

mvn install 报错Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2 错误: 找不到符号

报错信息 在Eclipse中执行mvn install时,console端显示如下报错信息: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project ERP: Compilation failure: Compilation failure: [ERROR] \test01\src\main\java\HStyl

修改grub解决计算机启动报错:ERROR 17

修改grub解决计算机启动报错:ERROR 17 原本计算机有C,D,E,F,G.C盘windows系统盘,G盘安装了Centos.后来由于需要,就压缩卷的方式从D盘压缩出一个H盘.然后再次启动计算机的时候就遇到了错误:ERROR 17 原因: 就在于先安装windows后安装Linux这样的话,grub就由位于G盘的Centos引导,现在该分区之前又划分出一个新的逻辑分区,就导致磁盘系统符号向后移了一位,因此grub失败. 解决方案: 1,刻录一个Linux安装U盘,进入BIOS修改启动项,从