mysql_query doesn't work but db_query does on a simple SELECT query
Just to start with let me very clearly say, never ever use mysql_query unless you really have to (multiple databases with different backends fx).

Why? db_query has a lot of security features built in to help prevent SQL injections, and it makes your site database agnostic (you won't have to change code if you change the database backend) and it allows you to use table prefixes without hardcoding them in the queries.

Anyways the reason why mysql_query doesn't work is because you need to create a connection to the database first using the database credentials, something drupal does automatically for you, when you use db_query.

If you really want to throw away all the good Drupal does for you and use mysql_query anyways, take a look at mysql_connect.