sherpaurgen
sherpaurgen

Reputation: 3274

Open large sql file and change some content to import to MySQL NDB cluster

I have about 44GB SQL backup file taken from mysql server 5.1.x (RAM 16G) which i need to import to ndb cluster but to do that i need to change the table engine from innodb to ndbcluster. For example "engine=InnoDB" to "engine=ndbcluster" in the sql dump file. when i try to open the sql file with "vim" editor my ssh session terminal freezes and i have to disconnect. Any ideas on how to change the content the SQL dump file ?

Upvotes: 0

Views: 422

Answers (1)

romainl
romainl

Reputation: 196586

You don't need a text editor for that:

$ sed "s/engine=InnoDB/engine=ndbcluster/g" -i.backup filename

Upvotes: 1

Related Questions