When two gloves with sensors touch each other, data should be sent to a database

You can use RFID to identify the gloves (one tag and one reader in each glove - the reader to identify the other, the tag to tell the other who you are), and other sensors to detect the duration of the touch/proximity.
Capacitive sensors maybe - either touch based (have the glove surface conductive) or just proximity based. Of course they will detect many more events, but you can easily filter them out for not having an RFID tag present.
Instead of Arduino+WiFi shield, get a NodeMCU or WeMOS D1. They have an ESP8266 processor with built-in WiFi. About the same cost as an Arduino. Sounds like a perfect fit for your application.
To connect to your MySQL database, look for the MySQL connector library. That makes the connection very easy to do.