MySQL error "No database selected"
I am using LAMP on localhost . I can log into a system that is using mysql db, go to the main page (data driven), but when I enter that particular page it is ok, but when I update the error "no database selected" then every page says so ...
I have restarted Apache server, MySQL
Browsers FF, IE, Chrome all show the same errors, also clears the cache. In the meantime, other websites that use the same LAMP server work fine.
Now that is strange
Any ideas are appreciated.
Try using code where it connects to the database and tries to pull the data. In most cases, there is a config file that also defines the connection attributes such as username, password, database server, port, and database.
for example in phpMyAdmin stores information in libraries / Config.class.php file.
a source to share