0
連接到MySQL:工作正常。C- Mysql - 警告:從不兼容的指針類型分配
mysql_real_connect(conn, server, user, pass, db, 0, NULL, 0);
我要像做
char *status = "";
status = mysql_real_connect(conn, server, user, pass, db, 0, NULL, 0);
printf(stauts);
上述嘗試導致編譯錯誤:需要
warning: assignment from incompatible pointer type
解決方案。
那麼,基本上,閱讀有關在C中使用mysql庫的手冊或教程。首先[mysql_real_connect](https://dev.mysql.com/doc/refman/5.7/en/mysql-real-connect.html )一個。 – ArturFH