私はMySqlデータベースからlocalhostアクセスを削除することができたので、PhpMyAdminは実行されませんが、単純なサンプルスクリプトは正常に動作します。私は昨日怒りでそれを使用し始めたので、少し助けていただければ幸いですか?PhpMyAdmin - ローカルホストのアクセスを回復できますか?
{
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.
}
これは、W3Cサイトのワーキングプログラムのスニペットであり、有効なユーザーと連携して動作し、他のユーザーは失敗します。 phpmyadminを実行できないのはなぜですか?どのような設定ファイルが書き直されましたか?
{
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "sql_learn";
try {
$conn = new PDO("mysql:host=$servername;dbname=$dbname", $username,$password);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$stmt = $conn->prepare("SELECT _id, _gibb FROM gibberish");
$stmt->execute();
// set the resulting array to associative
$result = $stmt->setFetchMode(PDO::FETCH_ASSOC);
foreach(new TableRows(new RecursiveArrayIterator($stmt->fetchAll())) as $k=>$v) {
echo $v;
}
アクセス権を削除しましたか? – Chay22
私はこの「情報」メッセージで混乱し、ローカルホストの接続を切断しようとしました。悪いアイデア。 {localhostの任意のユーザーが接続できるユーザーアカウントが存在します。これにより、アカウントのホスト部分が任意の(%)ホストからの接続を許可する場合、他のユーザーが接続できなくなります。 –