Changing host vs database
Under my current hosting plan, I have several domains and two of them are using the same database. I asked them if I moved one of those domains to another hosting plan it will still have access to the current database or not, and they said not possible. Is this the general rule, I mean can a website not access a database hosted under somewhere else and display info from them? Or if I changed hosts to somewhere else, it should be fine? If so where?
Also how hard it is to export a database if you changed your webhost?
The server assesses it's databases locally, so if it is on another server across the web it can't use it. If you have database admin tools such as phpmyadmin there is a function to backup and restore databases. Just create a backup and then copy that to the new server and restore it there.