Bora-hansgrohe's Pascal Ackermann, who won the points jersey at this year's Giro d'Italia, holds onto the overall lead despite finishing third behind Slovene Mezgec and Fernando Gaviria.
The 25-year-old is four seconds ahead of Mezgec, who lies fourth overall, and also jointly holds the lead in the sprint classification with Gaviria.
Frenchman Charles Planet moved to second in the overall standings after launching a breakaway shortly after the start of the race that also allowed him to strengthen his lead in the best climber and most active rider classifications.
Monday's third stage will see the riders travel 150.5 kilometres between Chorzow and Zabrze.
Classification 2nd stage:
1. Luka Mezgec (SLO/MTS) 3h 32:42, 2. Fernando Gaviria (COL/UAD) same time, 3. Pascal Ackermann (GER/BOH) s.t, 4. Danny van Poppel (NED/TJV) s.t, 5. Marc Sarreau (FRA/GFC) s.t
1. Pascal Ackermann (GER/BOH) 6h 30:26, 2. Charles Planet (FRA/NOV) at 1sec, 3. Fernando Gaviria (COL/UAD) at 2sec, 4. Luka Mezgec (SLO/MTS) 4sec, 5. Pawel Franczak (POL) at 6sec.