I don't have any Galileo with MySQL at hand to try, but maybe you can check the following:
1) Why the difference among IPs?:
IPAddress server_addr(192,168,1,100); // IP of the MySQL *server* here
system("ifconfig eth0 192.168.1.222 netmask 255.255.255.0");
2) Do the MySQL console work fine?
3) Try with "localhost" instead of the "external" IP address
This message was posted on behalf of Intel Corporation
I would like to know if you have checked your network connection with MySQL server. Both, the Galileo and the MySQL server must be in the same network, and as Fernando said, you must setup the MySQL server to permit network connections, also be sure there are not firewalls or port blocking software to prohibit access to the server (MySQL default port is 3306). If you have another computer available, please use it instead Galileo to verify if your user account and permissions used in your sketch can connect to the database server.
Hope this information helps, let us know your results.