Here is something I want to let you know.
well... I guess I found the reason of the problem with saving settings. I used to use ubuntu 16.04 with mysql 5.6 version which is you recommend me to use. I tried hard to uninstall v5.6 and change to install v5.5. The result is after I changed to v5.5, the problem with saving settings got normal. The problem is if you follow the official guideline to install mysql, you could only install the version higher than 5.6. The v5.5 is not available now.