当我尝试访问mysql数据库时,ide会出现“could not connect to mysql:access denied for user'smeeton'@'localhost'(using password:yes)”错误消息。我尝试了我在这里找到的每个命令,例如“mysql-u root-p-h”,但它总是问我用户名和密码,或者它不识别mysql关键字。我尝试从sql控制台创建新用户,但它不允许我这样做。如何连接数据库_
mysqli\u connect.php
<?php
DEFINE('DB_USER','smeeton');
DEFINE('DB_PASSWORD',"Lighthouse");
DEFINE('DB_HOST','localhost');
DEFINE('DB_NAME','estatedb');
$dbcon = @mysqli_connect(DB_HOST,DB_USER,DB_PASSWORD,DB_NAME) or die
('Could not connect to MySQL: '.mysqli_connect_error());
mysqli_set_charset($dbcon,'utf8');
?>
暂无答案!
目前还没有任何答案,快来回答吧!