[英]MYSQL/Databases Databases gone?
I have been working on my first project using databases using MySQL. 我一直在使用MySQL数据库进行我的第一个项目。 I woke up this morning unable to login to localhost.
我今天早上醒来,无法登录到本地主机。 I am able to enter root with no password and none of my databases are there.
我无需输入密码即可输入root,而且我的数据库都没有。 What should I do?
我该怎么办?
In theory root should have access to all your databases. 理论上,root应该可以访问您的所有数据库。 If you haven't deleted them, it's possible you just lost access to them.
如果您尚未删除它们,则可能是您失去了对其的访问权限。 Remember that MySQL is host-sensitive when logging in.
请记住,MySQL在登录时对主机敏感。
root@%
, root@localhost
, root@10.0.0.1
, etc... all may be assigned different permissions. root@%
, root@localhost
, root@localhost
root@10.0.0.1
等...都可以分配不同的权限。
You can try skip-grant-table
in my.ini
, as explained in this answer: 您可以在
my.ini
尝试skip-grant-table
,如以下答案中所述:
Regaining access to lost MySQL password for PHPMyAdmin on WAMP 重新获得WAMP上PHPMyAdmin丢失的MySQL密码的访问权限
With this you can reset the root password and try again. 这样,您可以重置root密码,然后重试。
If this does not yield effect, I would look into your SQL history and see if you haven't accidentally deleted them? 如果这没有效果,我将调查您的SQL历史记录,看看您是否意外删除了它们?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.