Cannot connect to mysql

I am new to Rustc. I just followed one of your examples to connect to mysql but it failed.

I receive the following error. I am using eclipse as IDE and Rustc and Diesel has been installed
Compiling myproject v0.1.0 (/xxx/Projects_Rust/myproject)
error[E0433]: failed to resolve: use of undeclared type PgConnection
–> src/
17 | PgConnection::establish(&database_url)
| ^^^^^^^^^^^^ use of undeclared type PgConnection

can anybody help here. thanks

If you want to connect to a mysql database you need to use the corresponding connection type. As the name and the documentation implies PgConnection is not the correct type. You are looking for MysqlConnection.