我无法访问本地网络和 phpMyAdmin

I cannot access the local web and phpMyAdmin

我有一个本地网站,每天都可以从其他电脑上访问。我做过的有:

A Database Error Occurred Unable to connect to your database server using the Provided settings. Filename: C: \ xampp \ system \ Database \ DB_driver.php Line Number: 124

同时,尽管输入了正确的用户名和密码,我也无法访问 phpmyadmin ...愚蠢的是,在此之前我没有先备份数据库和 htdocs。

我想回到我的本地网络访问和 phpMyAdmin。

我断定是我弄错了,数据库被锁了,所以无法访问我的本地网站。

这是我的config.inc.php

$cfg['Servers'][$i]['auth_type']     = 'cookie';      
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'mypassword';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';

或许您可以尝试重置您的 mysql root 密码。

首先您需要关闭 mysql 服务器

# server mysqld stop

使用安全模式

# mysqld_safe --skip-grant-tables &

登录mysql

# mysql -u root

使用sql命令更新您的密码

mysql> use mysql;
mysql> UPDATE user SET Password=PASSWORD("password") WHERE User='root';
mysql> flush privileges;
mysql> quit

重新启动您的 mysql 服务器

# service mysqld restart

尝试重新登录您的 phpMyadmin,希望对您有所帮助。