I have a client who does not want to switch hosting providers. This provider only allows one database per client. I am setting up a sandbox for the client and do not wish to share the database across the sandbox and the production website. Can I place a database within a database for the sandbox website? If so, I would like some recommendations on how to do this and how I would have WordPress access the nested database.
When you run the wordpress installation script, on step 5 of the famous 5 minute install https://codex.wordpress.org/Installing_WordPress#Step_5:_Run_the_Install_Script ... use the same Database Credentials as the existing site, but use a different prefix for the tables.
The default prefix is "wp_" make it something like "my_" and that's it.
(You'll see it says, "If you want to run multiple WordPress installations in a single database, change this.)