Copy wordpress from local to online

I have installed wordpress latest version (3.2.1)  , on my local machine , and then uploaded it to a host , when I go to the admin panel , it keeps redirecting me to the local address .

After debugging , I discovered that wordpress stores some info in a configuration file , and other info in database , and I have uploaded the database as it is .

To solve this problem , I open phpmyadmin on the host server , and I changed the site_url option to the correct one , from table wp_options .