I know it is possible to install a Python plugin in PostgreSQL to execute Python code natively.
Is it possible in MySQL server to execute native Python or C++ code?
Yes, there is an api for python and Mysql as well as C++ and Mysql.
You will need the Mysql Connector/Python 2.0 but make sure that it is compatible with your version of Python since they have one for Pv2 and Pv3.
More information here: http://dev.mysql.com/doc/connector-python/en/
There is also a Mysql Connector/C++ 1.1
More information here: http://dev.mysql.com/doc/connector-cpp/en/index.html