Saving sensor data directly to database is very important learning for any project dealing with IoT. Python is very powerful scripting language to automate the process. Getting data from Arduino as usual using Serial.
First run analog_read program on Arduino then run a python script to automate the SQL data insertion process. The major part is creating database in MySQL after installation. Get all the codes from my github link:
Inserted data can be checked either using query language on command line or HeidiSQL can be used to verify inserted data.