AMD A8-5600k needs DDR3-1866
I don't know what you mean by your CPU 'needing' DDR3 @1866MHz.
First of, what is the maximum RAM speed your MOBO supports? You can find it in the manual of the MOBO and it usually says:
'Motherboard supports RAM memory up to XXXXMHz'.
For example: if your MOBO runs the maximum DDR3 RAM speed of 1333MHz, yet you bought a 1600MHz DDR3 RAM stick, you can still install it onto your MOBO, but it won't run at 1600MHz but at 1333MHz, because that's the max speed of RAM the MOBO supports.
My current MOBO is
H270M Fatal1ty Performance from ASRock and it supports max RAM speed of 2400MHz. I run a 7th Gen i3 (the i3 7100) with a stick of 8GB DDR4 RAM @3200MHz, but my MOBO doesn't allow it to run at that speed so it clocks it down to the supported 2400MHz.
That's it. Use the RAM you have, just make sure your MOBO supports it.