Percona Toolkit:How to alter 1TB data table using Percona Toolkit In mysql 8.0.37
Percona Toolkit:How to alter 1TB data table using Percona Toolkit In mysql 8.0.37
pt-online-schema-change alters a table’s structure without blocking reads or writes. Specify the database and table in the DSN. Do not use this tool before reading its documentation and checking your backups carefully.
Step.1.We need required install and configure Percona Toolkit.
step.3.After that we are going to login mysql and create table and insert record.
Note:-If you create table without primary key than you can't alter table.
suppose that i am creating table without primary key than generate error llok like this
step.4.Now we are going to again login mysql and add primary key.
step.5.Now finally we are going to run command on terminal.
pt-online-schema-change --user='username'--password='password' --execute --alter "add column emp_salary INT" D=pankaj,t=emp
step.5.We have successfully add column in mysql using Percona Toolkit.now we are going to login and check table.
Comments
Post a Comment