OK, there are a lot of opinions about this out there, mostly claiming that too little salt causes this. In my experience the level of salt has little to do with the "slime". The only time this has happened to one of my batches was when I left the recently chopped cabbage with added salt to draw out the brine over night before packing it into the sterilised jar to ferment. Leaving the cabbage to "rest" for a while after crushing the cabbage draws out extra brine and makes it easier to create enough to cover the kraut without having to do as much work. I usually leave it for an hour or so, but I was a bit tired and decided to cover it and finish packing the kraut in the morning instead. After a few weeks the kraut looked normal at first, but when we took some out it was slimy and smelt very slightly different - it went straight in the bin.
I believe what caused this is that the fermentation process was affected when some of it took place in an oxygen rich environment, rather than the anaerobic environment created in the jar when the cabbage is packed and submerged in the brine. In other words, leaving the salted cabbage out of the jar for too long encourages the fermentation to begin outside of the controlled environment of the sealed jar, which encourages a different profile of flora and therefore a different fermentation process to take place, which affects the consistency of the brine.
To resolve this, just make sure you don't leave the cabbage out for too long before packing it in. Also make sure that the seal on the jar is tight by using an appropriate container, and that the cabbage is completely submerged in the brine before fermenting. All of these steps help ensure that your cabbage is fermenting in an optimum environment, which will minimise the risk of a batch going "slimy".