Home  >  Article  >  Database  >  Debian下重建MySQL数据库

Debian下重建MySQL数据库

WBOY
WBOYOriginal
2016-06-07 16:41:361297browse

经常由于折腾,数据库损坏了或者密码丢了,可以重建一下数据库: service mysql stop rm -rf /var/lib/mysql mysql_install_db service mysql start mysqladmin -uroot -p password 然后输入密码 本文出自:http://blog.friskit.me/, 原文地址:http://blog.

经常由于折腾,数据库损坏了或者密码丢了,可以重建一下数据库:

<code class="language-shell">service mysql stop  
rm -rf /var/lib/mysql  
mysql_install_db  
service mysql start  
mysqladmin -uroot -p password  
</code>

然后输入密码

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn