I was facing some issue with mysql so I had uninstalled it completely and then reinstalled it again.
So, when I went to my website now it was giving me “Error Establishing Database Connection”
Just to confirm everything I check show databases on sql
And I got this output:
mysql> show databases;
--------------------
| Database |
--------------------
| information_schema |
| mysql |
| performance_schema |
| sys |
--------------------
instead of this:
mysql> show databases;
--------------------
| Database |
--------------------
| information_schema |
| mysql |
| performance_schema |
| sys |
| wordpress |
--------------------
I don’t why this is happening even though I can see wordpress file in /var/lib/mysql/
Does anyone what is causing this issue? And how can I resolve it?
Thanks!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hello,
Would you mind sharing more information on how did you restore the database after reinstalling the MySQL service?
Usually what I would personally do is:
.sql
backup:Let me know how this goes.
Best,
Bobby