Connection failed: access denied for user 'root'@'10.xx.xxx.xxx' (using password: yes)

Assalamualaikum maaf mau nanya ini confing saya tidak bisa konek muncul sperti keterangan seperti di jdul pertanyaan saya. mohon petunjuk dari para mastah terima kasih

<?php
    $servername = "10.xx.xxx.xxx";
    $username = "root";
    $password = "xxxxxxx";
    $dbname = "db_nosscls";

    // Create connection
    $conn = new mysqli($servername, $username, $password, $dbname);
    // Check connection
    if ($conn->connect_error) {
        die("Connection failed: " . $conn->connect_error);
    }

    // $sql = "SELECT * FROM `a_circuit_critical_cron_down` ORDER BY `timestamp` DESC LIMIT 5";
    // $result = mysqli_query($conn, $sql);


    // if (mysqli_num_rows($result) > 0) {
    //     // output data of each row
    //     while($row = mysqli_fetch_assoc($result)) {
    //         $data_critical_backbone[] = (float)$row['jml_down'];
    //     }
    // }

    $d1=mysqli_query($conn,"SELECT jumlah FROM `alert_transport_backbone` ORDER BY `timestamps` DESC LIMIT 0,1");
    foreach ($d1 as $row) {
        $dtb1 = $row['jumlah'];
    }
    $d2=mysqli_query($conn,"SELECT jumlah FROM `alert_transport_backbone` ORDER BY `timestamps` DESC LIMIT 1,1");
    foreach ($d2 as $row) {
        $dtb2 = $row['jumlah'];
    }
    $d3=mysqli_query($conn,"SELECT jumlah FROM `alert_transport_backbone` ORDER BY `timestamps` DESC LIMIT 2,1");
    foreach ($d3 as $row) {
        $dtb3 = $row['jumlah'];
    }
    $d4=mysqli_query($conn,"SELECT jumlah FROM `alert_transport_backbone` ORDER BY `timestamps` DESC LIMIT 3,1");
    foreach ($d4 as $row) {
        $dtb4 = $row['jumlah'];
    }
    $d5=mysqli_query($conn,"SELECT jumlah FROM `alert_transport_backbone` ORDER BY `timestamps` DESC LIMIT 4,1");
    foreach ($d5 as $row) {
        $dtb5 = $row['jumlah'];
    }
?>

avatar Mantofani
@Mantofani

60 Kontribusi 3 Poin

Diperbarui 5 tahun yang lalu

1 Jawaban:

Data $servername, $username, $password sma $dbname udh bner belum.?

avatar Rilham
@Rilham

162 Kontribusi 56 Poin

Dipost 5 tahun yang lalu

Tanggapan

Casenya udah selesai trima kasih banyak atas responnya

Login untuk ikut Jawaban