作者:小Q理性的激情农_885 | 来源:互联网 | 2023-05-19 00:18
IupdatemyPHPversionto7onmyCentos7server.我在我的Centos7服务器上将我的PHP版本更新为7。Withmysequelpro
I update my PHP version to 7 on my Centos7 server.
我在我的Centos7服务器上将我的PHP版本更新为7。
With my sequel pro I can connect to my database from everywhere but with normal mysql connection in php I get an Access denied. Someone had the same problem and solved it?
随着我的续集专业版,我可以从任何地方连接到我的数据库,但在PHP中使用正常的mysql连接我得到访问被拒绝。有人有同样的问题并解决了吗?
$servername = "localhost";
$username = "xxxx";
$password = "xxxxx";
$cOnn= new mysqli($servername, $username, $password);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
echo "Connected successfully";
2 个解决方案