If your cookie domain is blank you should be able to login fine it will just create the cookie with the domain name your on so make sure you are on the domain name your software is on like
www.domain.com versus domain.com
To update via mysql you can run a query in phpmyadmin but if you can do that you can also view the settings table and edit the entry in the settings table as well just as easy.
UPDATE rp_settings SET setting='.domain.com' WHERE id=216