Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR Error 1146: Table '<db>._temp_no_ghc' doesn't exist #1432

Open
rnkhouse opened this issue Jul 9, 2024 · 2 comments
Open

ERROR Error 1146: Table '<db>._temp_no_ghc' doesn't exist #1432

rnkhouse opened this issue Jul 9, 2024 · 2 comments

Comments

@rnkhouse
Copy link

rnkhouse commented Jul 9, 2024

I am using this command:

./gh-ost --azure=true --host="host" --database="db-name" --user="user" --password="password" --ssl-ca=DigiCertGlobalRootG2.crt.pem --ssl=true --ssl-allow-insecure=true --assume-rbr --allow-on-master=true --alter="ALTER TABLE temp_no ADD COLUMN tempID int NULL DEFAULT NULL"

Error:

[2024/07/09 17:19:44] [info] binlogsyncer.go:374 begin to sync binlog from position (mysql-bin.000112, 77638393)
[2024/07/09 17:19:44] [info] binlogsyncer.go:791 rotate to (mysql-bin.000112, 77638393)
# Migrating `<db>`.`temp_no`; Ghost table is `<db>`.`_temp_no_gho`
# Migration started at Tue Jul 09 17:19:43 -0400 2024
# chunk-size: 1000; max-lag-millis: 1500ms; dml-batch-size: 10; max-load: ; critical-load: ; nice-ratio: 0.000000
# throttle-additional-flag-file: /tmp/gh-ost.throttle 
# Serving on unix socket: /tmp/gh-ost.<db>.temp_no.sock
Copy: 0/0 100.0%; Applied: 0; Backlog: 0/1000; Time: 1s(total), 0s(copy); streamer: mysql-bin.000112:77643330; Lag: 0.12s, HeartbeatLag: 0.02s, State: migrating; ETA: due
Copy: 0/150 0.0%; Applied: 0; Backlog: 0/1000; Time: 1s(total), 0s(copy); streamer: mysql-bin.000112:77643330; Lag: 0.12s, HeartbeatLag: 0.02s, State: migrating; ETA: N/A
CREATE TABLE `_temp_no_gho` (
  `id` int NOT NULL AUTO_INCREMENT,
  `no` varchar(10) DEFAULT NULL,
  `status` varchar(25) NOT NULL,
  `tempID` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) /*!50100 TABLESPACE `innodb_system` */ ENGINE=InnoDB AUTO_INCREMENT=230 DEFAULT CHARSET=utf8mb3
[2024/07/09 17:19:45] [info] binlogsyncer.go:180 syncer is closing...
[2024/07/09 17:19:45] [info] binlogsyncer.go:864 kill last connection id 2090439
[2024/07/09 17:19:45] [info] binlogsyncer.go:210 syncer is closed
2024-07-09 17:19:45 ERROR Error 1146: Table '<db>._temp_no_ghc' doesn't exist
# Done
@yunusuyanik
Copy link

yunusuyanik commented Aug 5, 2024

I also hit the same issue, the problem is checking wrong table name.
It's creating <db>._temp_no_gho table but looking for this one '<db>._temp_no_ghc' there is a difference in last letter.

Ah, I found it, you need to specify --execute option which allow you to do real migration process, but even without it, the tool shoudn't give an error about it.

@SiddiqueAhmad
Copy link

we were about to leave gh-ost as we tried all ways to run the script at production but we were missing the --execute param. Thanks to pointing it out. @yunusuyanik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants