After some more tests and digging, I found the issue: MySQL considers that WKT with EPSG=4326 are given in lat-long while PostGIS considers that they are given in long-lat. This behavior can be customized using the axis-order option for the ST_GeomFromText function in MySQL.
The MySQL query
SELECT ST_AsText(ST_Transform(ST_GeomFromText('POINT(5 45)', 4326, 'axis-order=long-lat'), 2154));
returns a result very close to the one with the initial query in PostGIS.