In a hifi system the signal ground should be connected to the chassis mains earth in one place only in the individual boxes, this is normally in the pre amp or int Amp.
if the signal ground is connected to the mains or chassis earth in 2 individual components that will create a mains loop and resulting hum
So I would look for a link in your CD player's signal ground to earth and disconnect that.
As others have said if an item comes with a 3 core mains lead then it is not double insulated and it is risky to disconnect the chassis earth, your fix does at least give a path to earth in a fault status but you are not fixing the real problem
Alan
Turntable - Garrard 401/Jelco 750L/Ortofon Kontrapunkt B, Pioneer PLC 590, Micro Sieki MA505 , Denon DL103R - DIY Paradise Phono stage - Reel 2 Reel Studer A810, Otari MX55,Tascam BR20, Revox A77, B77, PR99, TEAC X1000 & 3440, Digital HTPC / Young Dac - Preamp - DIY B4, 821, Power Amp's DIY Avondale NCC300 Mono Block, Speakers Wilmslow Kit Volt BM220.8 / Scanspeak D2905/9500