The KKK was founded by Confederate soldiers, NOT the Democratic Party, as you imply. A small number of members were Democrats.
"Historians generally agree it was founded by a handful of Confederate veterans in Pulaski, Tenn. as a social fraternity and it quickly changed into a violent group that terrorized newly empowered black and white Republicans in the South. [...] many angry Southern whites during the 1860s and 1870s were Democrats and a smaller number of them joined the KKK.

Proof?
www.politifact.com/virginia/statements/2013/jun/10/stephen-martin/state-sen-stephen-martin-says-democratic-party-cre/