Autentication UID RFID card with UID in database mysql use ethernet

#define SS_PIN 53
#define RST_PIN 49

This suggests that you are using a Mega, with 4 hardware serial ports.

SoftwareSerial mySerial(8,9);

This suggests that you have not bothered to read the SoftareSerial documentation, and which pins you can, and can NOT use, on the Mega.

Of course the presence of this line suggests that you need to SERIOUSLY read up on the capabilities of the hardware you have AND use the native capabilities instead.

You attempt to read the RFID card ONCE, when setup() runs. If the card is not present, nothing ever happens.

Why are you not trying, even though you WOULD fail, to read the card in loop()?