標題重寫為:嚴重錯誤:無法存取使用者'Adeleke'@'localhost'的mysqli_sql_exception異常(使用密碼:是)
<p>我嘗試使用 XAMMP(本地主機)測試我的 php 軟體,但點擊 URL 後,我不斷收到:</p>
<pre class="brush:php;toolbar:false;">Fatal error: Uncaught mysqli_sql_exception: Access denied for user 'Adeleke'@'localhost' (using password: YES)</pre>
<p>我以為它來自 xammp <strong>PhpMyAdmin</strong>,所以我安裝了 Laragon 並嘗試在其上測試該軟體,下面是它顯示的內容</p>
<pre class="brush:php;toolbar:false;">Fatal error: Uncaught mysqli_sql_exception: Access denied for user 'Adeleke'@'localhost' (using password: YES) in CMy:\laragon\www\wwwQueerDate\www\www install\index.php:47 Stack trace: #0 C:\laragon\www\MyQueerDate\install\index.php(47): mysqli_connect('127.0.0.1', 'Adeleke', 'Badvibe019!', 'Laragon. MySQL') #1 {main} thrown in C:\laragon\www\MyQueerDate\install\index.php on line 47</pre>
<p>這是 MyQueerDate\install\index.php 第 46 - 49 行的程式碼:</p>
<pre class="brush:php;toolbar:false;">if (!empty($_POST['install'])) {
$con = mysqli_connect($_POST['sql_host'], $_POST['sql_user'], $_POST['sql_pass'], $_POST['sql_name']);
if (mysqli_connect_errno()) {
$ServerErrors[] = "Failed to connect to MySQL: " . mysqli_connect_error();</pre>
<p>我嘗試檢查軟體的輸出並查看儀表板和管理面板,但它一直顯示;</p>
<pre class="brush:php;toolbar:false;">Fatal error: Uncaught mysqli_sql_exception: Access denied for user 'Adeleke'@'localhost' (using password: YES) in CMy:\laragon\www\wwwQueerDate\www\www install\index.php:47 Stack trace: #0 C:\laragon\www\MyQueerDate\install\index.php(47): mysqli_connect('127.0.0.1', 'Adeleke', 'Badvibe019!', 'Laragon. MySQL') #1 {main} thrown in C:\laragon\www\MyQueerDate\install\index.php on line 47</pre>
<p>我在 cPanel 上嘗試過,它可以工作,但我不想在 cPanel 上測試程序,我現在無法支付託管費用,我想嘗試 localhost。 </p>