-o test means the output file should be named "test".
test.cpp is your source file, of course.
-L/usr/include/mysql means looking for libraries in / usr / include / mysql, as well as in the normal link path. (He probably doesn't find any libraries, my libmysqlclient.a is in the standard library directory / usr / lib. So I don't think you need this option.)
-lmysqlclient means a reference to the mysqlclient library (actually called libmysqlclient.a)
-I/usr/include/mysql means search for #include files in / usr / include / mysql, as well as in the usual include path.
source share