3/26/2009

trivial problems with MySql

I had to store my project data to database in Linux, I choosed mySql.
If you want to connect to it and use it correctly
Rules No.1:Install mysqlsever and mysqlclient in your computer

Rules No.2:Install libmysqlserverXX-dev,for example libmysqlserver16-dev or you can never find mysql.h

Rules No.3:When you encounted with a problems, said that undefined reference to my_sql_connect or my_sql_xx, first executed mysql_config --libs in your terminal, and add -L/usr/lib/mysql and -lmysqllicent to your compile command.
======
By the way, if there is a problem called "core dump", try gdb you'll find the bug behind your progamme. If you want to see the core file. you can excuted "ulimit -1000" in your terminal.