What’s the best action to use when you want to do something only once per theme setup?

You should read this: Activation/Deactivation hook for wordpress theme

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