很多游戏服务器都是采用mysql数据库进行数据落地的,linux下mysql的使用主要包括以下几个函数(头文件mysql.h):
mysql_init
mysql_real_connect
mysql_select_db
mysql_query
mysql_real_query
mysql_store_result
mysql_fetch_row
mysql_free_result
mysql_close
一个可能的函数执行序列为依次调用以上函数。
可以使用mysql -h ip地址 -uroot -ppasswd连接数据库,连上后,可以使用\s查看数据库详细信息,比如使用的是什么连接(tcp或者sock)等。
参考资料:
https://www.cnblogs.com/shiyingzhi/p/7896259.html
https://www.cnblogs.com/justinzhang/archive/2011/09/23/2185963.html
https://blog.csdn.net/u011249920/article/details/52100761
https://mp.csdn.net/console/editor/html/107961766
https://blog.csdn.net/qq_39554698/article/details/98739440
https://blog.csdn.net/joseph_happy/article/details/26222139
http://blog.chinaunix.net/uid-25547034-id-3028915.html?_t=t
https://blog.csdn.net/qq_38570571/article/details/79870763
https://blog.csdn.net/iteye_4528/article/details/82214534
http://blog.sina.com.cn/s/blog_614b0c450100hvxs.html
https://my.oschina.net/Rosewillow/blog/884414
https://www.cnblogs.com/ubunoon/archive/2007/03/05/2058947.html
http://blog.sina.com.cn/s/blog_5037eacb0102vkb4.html