How to create a plugin that notifies for updates?

There is a plugin for that: Automatic Updates For Private And Commercial Plugins.

To prevent upgrade checks against the WordPress.org data base in your plugin use the function Mark Jaquith has written.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)