mysql_query doesn't work but db_query does on a simple SELECT query I'm receiving the following warnings when I use mysql_query() in my modules:

mysql_query(): A link to the server could not be established in ...... on line 6

If I use db_query() instead, it works fine. 

The code is a simple SELECT query with no special characters or variables.
The actual query is mysql_query("SELECT * FROM custom_nodify WHERE nid = 345");

I should mention that this happens with ANY mysql_query(), not just the one above.

Any suggestions as to why this doesn't work?
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.