Not the answer you need?
Register and ask your own question!
Many Forum changes were implemented on Tue 22 Sep. Read about new Ranks, Scoring, and Reactions.
Email [email protected] for any comments or concerns.

pt-table-sync error (character encoding)

mbcheikhmbcheikh Current User Role Novice
Hi,
How can I fix this error ? Which env variables or locales, or mysql variables of the hosts I have to check ? Hosts are ubuntu servers.Note that the column "désignation" (in french)  is written correctly in the printed sql, but  I am completely ignorant in perl to interpret it.  Thank you.
# pt-table-sync --execute --verbose --databases biogal --charset=utf8 -t ligbl  h=10.8.0.11,u=root,p=xxxxxxxx h=127.0.0.1,u=root,p=xxxxxxxx
# Syncing A=utf8,h=127.0.0.1,p=...,u=root
# DELETE REPLACE INSERT UPDATE ALGORITHM START    END      EXIT DATABASE.TABLE
Unknown column 'désignation' in 'field list' [for Statement "INSERT INTO `biogal`.`ligbl`(`dp`, `a d`, `prod`, `quant`, `prix u`, `t`, `r`, `client`, `date`, `l`, `x`, `mois`, `nb cartons`, `n0 lot`, `date peremption`, `conditionnement`, `cond`, `pmp`, `prix_devise`, `tarif`, `devise`, `cours`, `nouvnumcom`, `rcno`, `désignation`, `n°commande`, `n°facture`, `année`, `n°bl`) VALUES ('M06', '', 'T.D', 1, 70000, 19, 0, 20557, '2020-07-20 00:00:00', 2, NULL, NULL, 0, '', '1980-01-01 00:00:00', 1, '', 0, NULL, NULL, NULL, NULL, '0', '243127', 'Temps de d�placement', '158005', NULL, NULL, '2002376') /*percona-toolkit src_db:biogal src_tbl:ligbl src_dsn:A=utf8,h=10.8.0.11,p=...,u=root dst_db:biogal dst_tbl:ligbl dst_dsn:A=utf8,h=127.0.0.1,p=...,u=root lock:0 transaction:1 changing_src:0 replicate:0 bidirectional:0 pid:14791 user:root host:biom*/"] at line 10946 while doing biogal.ligbl on 127.0.0.1
#      0       0      0      0 0         01:34:46 01:35:22 1    biogal.ligbl
# pt-table-sync --version
pt-table-sync 3.2.0



Tagged:

Answers

  • jriverajrivera Percona Support Engineer Percona Staff Role
    # Syncing A=utf8,h=127.0.0.1,p=...,u=root
    Try specifying A=utf8m4 or --charset=utf8mb4 in your command and let us know if that resolves it.
  • mbcheikhmbcheikh Current User Role Novice
    Thank you  for the answer. Unfortunatly it gives the same result :(. But I have to specify that the source server is mysql 5.7 while the target server is 8.0. does this matter ?
    [email protected]:/home/scripts# pt-table-sync --execute --verbose --databases biogal   --charset=utf8mb4 -t ligbl  h=10.8.0.11,A=utf8mb4,u=root,p=xxxxxxxx h=127.0.0.1,A=utf8mb4,u=root,p=xxxxxxxx
    # Syncing A=utf8mb4,h=127.0.0.1,p=...,u=root
    # DELETE REPLACE INSERT UPDATE ALGORITHM START    END      EXIT DATABASE.TABLE
    Unknown column 'n°facture' in 'field list' [for Statement "INSERT INTO `biogal`.`ligbl`(`dp`, `a d`, `prod`, `quant`, `prix u`, `t`, `r`, `client`, `date`, `l`, `x`, `mois`, `nb cartons`, `n0 lot`, `date peremption`, `conditionnement`, `cond`, `pmp`, `prix_devise`, `tarif`, `devise`, `cours`, `nouvnumcom`, `rcno`, `n°facture`, `désignation`, `année`, `n°commande`, `n°bl`) VALUES ('M06', '', 'T.D', -1, 90000, 19, 0, 20491, '2020-07-22 00:00:00', 1, NULL, NULL, 0, '', '1980-01-01 00:00:00', 1, '', 0, NULL, NULL, NULL, NULL, '0', '243364', NULL, 'Temps de d�placement', NULL, '157708', '2002471') /*percona-toolkit src_db:biogal src_tbl:ligbl src_dsn:A=utf8mb4,h=10.8.0.11,p=...,u=root dst_db:biogal dst_tbl:ligbl dst_dsn:A=utf8mb4,h=127.0.0.1,p=...,u=root lock:0 transaction:1 changing_src:0 replicate:0 bidirectional:0 pid:28556 user:root host:biom*/"] at line 10946 while doing biogal.ligbl on 127.0.0.1
    #      0       0      0      0 0         23:31:12 23:31:43 1    biogal.ligbl

    I also tried with only A and  only --charset

  • mbcheikhmbcheikh Current User Role Novice
    Ok! It works perfectly (for now) wiith 2.2.20 version of percona-toolkit,  without --charset=utf8 or A.
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.