Well, this is very good questions. But let me make sure one thing... GNU/GPL has nothing to do with Open Source Software ! instead what it says is "Free Software" ! And these two concepts are different ! anyway. now on your question.
If you are using mySQL under GNU/GPL for Free of cost, u must release ur application/program under GNU/GPL to comply with the license. ( *linuxjunkies.org/documents/gpl.txt )
But if u wish not to release ur program as GNU/GPL'd u have to purchase mySQL from the mySQL AB, the owner co.
This is mySQL's Dual Licensing policy.
( *www.mysql.com/products/licensing/faq.html )
and now on php, php3 was released on GNU/GPL but ver 4 is under QPL ( Q Public License ). havenot gone through that completely so unable to comment...
But one thing is sure, if ur work is derived fom a FREE Software u have to release that under GNU/GPL !