change database to multisite in localhost

So just to clarify, you’ve already setup the multisite by following:
https://codex.wordpress.org/Create_A_Network

And the multisite is working and you can create subdomains. But you want your current site to be a subdomain?

If so, I think the best way to do this will be to create the new sub site first, then use a cloning/migration plugin to copy all your data from your current site to the new sub site. WordPress has it’s own export-import plugin:

https://en-gb.wordpress.org/plugins/wordpress-importer/

The WordPress Importer will import the following content from a WordPress export file:

  • Posts, pages and other custom post types
  • Comments
  • Custom fields and post meta (this will include your post thumbnails and attachments).
  • Categories, tags and terms from custom taxonomies
  • Authors

Then you can remove all the data on your root site.

There are other cloning/migration plugins if you don’t like the WordPress importer.

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