Show Recently Viewed Custom Post to the visitor without plugin

you can achieve that by using cookies. just create a cookie on init function on single page and create a array inside cookie with time of the visit on the post.
And then you can retrieve the posts according to your design.

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