how to use mysql existing connection in c code