The errors
are
guido@mapped-129-120-38-131:~/c_files> g++ data.cpp
/tmp/ccthAKzt.o: In function `main':
data.cpp:(.text+0x12): undefined reference to `mysql_init'
data.cpp:(.text+0x8e): undefined reference to `mysql_real_connect'
data.cpp:(.text+0xa3): undefined reference to `mysql_error'
data.cpp:(.text+0xb1): undefined reference to `mysql_errno'
collect2: ld returned 1 exit status