Can you provide an example code snippet for connecting to a MySQL database using PDO in PHP?