Some USB sockets use the data pins to hold the socket onto the PCB - those can routinely break off if the cable is plugged/unplugged too often, or even if too much lateral force is applied once it is connected.
Others have a metal tab forming part of the socket housing that is also soldered into the PCB - those are considerably more robust.
With care, most keyboards should survive a reasonable amount of connecting/disconnecting.
But ... would you be disconnecting the mini USB at the keyboard end? Or at the PC end?
I try to keep my cables with their respective keyboards, which means only unplugging from the computer's USB port and carefully holding the USB cable while I lift up the keyboard. So far no breakages
![Smiley :)](https://cdn.geekhack.org/Smileys/solosmileys/smiley.gif)