新的SQL连接未出现在LocalHost中

新的SQL连接未出现在LocalHost中

问题描述:

I'm trying to make a new connection to mysqladmin, but for reason's I cannot figure out, it will not work. From what I can see I have everything correct. Can someone please take a look and see what I am doing wrong?

Firstly, the User: PHPmyadmin

and then my sql: my sql

finally the localhost, the file is saved in a folder in the www folder of wamp so I have no idea why it is not showing. It is just blank.

Help is greatly appreciated. Thank u very much in advance.

我正在尝试建立与mysqladmin的新连接,但由于理由我无法弄清楚,它无法正常工作 。 从我所看到的,我有一切正确。 有人可以看看我做错了吗? p>

首先,用户: PHPmyadmin p>

然后我的sql: 我的sql p>

最后是localhost,文件保存在wamp的www文件夹中的文件夹中,所以我不知道为什么呢 没有显示。 它只是空白。 p>

非常感谢帮助。 非常感谢你。 p> div>

You're not telling your php script what to do if the MySQL connection is successful, thats why output is blank.

Also, i suggest you using mysqli object

<?php
    // Create connection
    $conn = new mysqli('localhost', 'Desino', 'password');

    // Check connection
    if ($conn->connect_error) {
        die('Cannot connect: ' . $conn->connect_error);
    } 
    echo 'Connected successfully';
    $conn->close();
?>