In this post you can learn how to connect to mysql "sakila" db in Talend Open Studio.
1) From Palette navigate to Databases -> MySQL and drag and drop "tMysqlConnection" component
2) Select the component, then in its Components pane provide database access details as shown in below image.
3) Add to Message boxes for Success or Failure messages of db connection. These message boxes should be connected for OK or Error on component execution from tMysqlConnection component.