If you don't need the internal data of struct MYSQL and you don't want to care about. Then just keep some reference in your program.
alias void MYSQL; alias void MYSQL_RES; and then only use MYSQL* and pass it to every function. struct Connection { MYSQL* _mysql; ~this() { } this(int dummy = 0) { mysql_init(_mysql); } }