You MIGHT need shell access on the server MySQL is located on, or you MIGHT NOT.
This depends on how MySQL is setup as far as users and where they are allowed to connect from, and whether or not MySQL is running on the same host as the webserver.
MOST webhosts have MySQL and Apache running on the same computer, and only allow connections from localhost unless you ask them to specifically allow something else.
Or at least MOST that I've dealt with. And in this case, you do need shell access, or an equivalent PHP workaround.