Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12201

mysqldump: Error in field count for table: aborting

$
0
0

My Environment

  • Azure Flexible Server MySQL
  • MySQL version 8.0
  • mysqldump Ver 10.14 Distrib 5.5.68-MariaDB, for Linux (x86_64)

I am trying to backup a MySQL database using mysqldump, and I am having a hard time understanding what is going on. The same process works in the Preproduction environment, but it does not in Production. We have the same Azure MySQL flexible distribution, tier and DB version.We use a Linux VM in PRE and another one in PRO where I have a MySQL client installed, same version in both environments. The only difference is that the Preproduction VM is RedHat 8, meanwhile the PRO VM is still RedHat 7.

Preproduction

[lvmadmn101@hcbae2c01lvm101 ~]$ mysql -u mysqladmn001 -p'xxxxxxxxxxxxxxxxx' -h xxxxxxxxxxxx.mysql.database.azure.com -P 3306 --ssl=trueWelcome to the MariaDB monitor.  Commands end with ; or \g.Your MySQL connection id is 570801Server version: 8.0.36-cluster Source distributionCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.MySQL [(none)]> use mdp;Reading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with -ADatabase changedMySQL [mdp]> show columns from targetproject ;+------------+-----------------+------+-----+---------+--------------------------+| Field      | Type            | Null | Key | Default | Extra                    |+------------+-----------------+------+-----+---------+--------------------------+| my_row_id  | bigint unsigned | NO   | PRI | NULL    | auto_increment INVISIBLE || PROJNAME   | varchar(64)     | NO   | MUL | NULL    |                          || TYPENAME   | varchar(32)     | NO   | MUL | NULL    |                          || TARGETNAME | varchar(32)     | NO   | MUL | NULL    |                          |+------------+-----------------+------+-----+---------+--------------------------+4 rows in set (0.004 sec)MySQL [mdp]> select count(*) from targetproject ;+----------+| count(*) |+----------+|        8 |+----------+1 row in set (0.025 sec)MySQL [mdp]>

Now, running mysqldump here works without issues.

[lvmadmn101@hcbae2c01lvm101 ~]$  /usr/bin/mysqldump --host=xxxxxxxxxxxxxxxxx.mysql.database.azure.com --port=3306 --user=mysqladmn001 --ssl=true --verbose --databases mdp  > /pgupgrade/mysql/mdp_pre.sql-- Connecting to xxxxxxxxxxxxxxxxx.mysql.database.azure.com...-- Retrieving table structure for table batch_job_execution...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table batch_job_execution_context...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table batch_job_execution_params...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table batch_job_execution_seq...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table batch_job_instance...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table batch_job_seq...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table batch_step_execution...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table batch_step_execution_context...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table batch_step_execution_seq...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table config...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table docerror...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table docmsg...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table mapmeta...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table maptypes...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table nodes...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table notif...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table postprocess...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table postproproject...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table preprocess...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table preproproject...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table proyect...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table source...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table spring_session...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table suscriber...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table suscription...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table target...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table targetproject...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table type_error_desc...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table users...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table usersproyect...-- Sending SELECT query...-- Retrieving rows...-- Disconnecting from hcbi1weupfsdmsmdpdata001.mysql.database.azure.com...[lvmadmn101@hcbae2c01lvm101 ~]$

Production

Now, let's switch to the Production environment.

[lvmadmn015@hcbae2p01lvm015 mysql]$ mysql -u mysqladmn001 -p'xxxxxxxxxxxxxx' -h xxxxxxxxxxxxxxxxxxxxx.mysql.database.azure.com -P 3306 --ssl=trueWelcome to the MariaDB monitor.  Commands end with ; or \g.Your MySQL connection id is 6424Server version: 8.0.36-cluster Source distributionCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.MySQL [(none)]> use mdp;Reading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with -ADatabase changedMySQL [mdp]> show columns from targetproject ;+------------+-----------------+------+-----+---------+--------------------------+| Field      | Type            | Null | Key | Default | Extra                    |+------------+-----------------+------+-----+---------+--------------------------+| my_row_id  | bigint unsigned | NO   | PRI | NULL    | auto_increment INVISIBLE || PROJNAME   | varchar(64)     | NO   | MUL | NULL    |                          || TYPENAME   | varchar(32)     | NO   | MUL | NULL    |                          || TARGETNAME | varchar(32)     | NO   | MUL | NULL    |                          |+------------+-----------------+------+-----+---------+--------------------------+4 rows in set (0.01 sec)MySQL [mdp]> select count(*) from  targetproject ;+----------+| count(*) |+----------+|        8 |+----------+1 row in set (0.01 sec)

Running mysqldump in Production produces this error:

[lvmadmn015@hcbae2p01lvm015 mysql]$ /usr/bin/mysqldump --host=xxxxxxxxxxxxxxxxx.mysql.database.azure.com --port=3306 --user=mysqladmn001 --ssl=true --verbose --databases mdp  > /pgupgrade/mysql/mdp_pro_1306.sql-- Connecting to xxxxxxxxxxxxxxxxx.mysql.database.azure.com...-- Retrieving table structure for table config...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table docerror...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table docmsg...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table mapmeta...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table maptypes...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table nodes...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table notif...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table postprocess...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table postproproject...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table preprocess...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table preproproject...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table proyect...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table source...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table suscriber...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table suscription...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table target...-- Sending SELECT query...-- Retrieving rows...-- Retrieving table structure for table targetproject...-- Sending SELECT query...-- Retrieving rows...mysqldump: Error in field count for table: `targetproject` !  Aborting.[lvmadmn015@hcbae2p01lvm015 mysql]$

I really don't understand the meaning of the error mysqldump: Error in field count for table: targetproject ! Aborting. There is no field called count in that table, and the invisible column cannot be, because is the same in PRE and it works there.

Does anyone knows what this error could be?

Thanks


Viewing all articles
Browse latest Browse all 12201

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>