gpt4 book ai didi

mysql - 无法打开我的主页,而是从 mysql 获取旧的警告消息

转载 作者:行者123 更新时间:2023-11-29 23:22:40 26 4
gpt4 key购买 nike

嗨,我尝试使用错误的密码连接到 mysql。我终于做到了,但现在当我尝试访问我的主页 www.hari.se 时,我只是关注;

Warning: mysql_connect(): Access denied for user 'hari.se'@'csea04.cliche.se' (using password: YES) in /home/virtual/hari.se/public_html/PHP/db.php on line 2  
Warning: mysql_select_db(): Access denied for user 'root'@'localhost' (using password: NO) in /home/virtual/hari.se/public_html/PHP/db.php on line 3
Warning: mysql_select_db(): A link to the server could not be established in /home/virtual/hari.se/public_html/PHP/db.php on line 3
Warning: mysql_query(): Access denied for user 'root'@'localhost' (using password: NO) in /home/virtual/hari.se/public_html/index.php on line 7
Warning: mysql_query(): A link to the server could not be established in /home/virtual/hari.se/public_html/index.php on line 7
Access denied for user 'root'@'localhost' (using password: NO)

请问各位 friend 有什么可以帮忙的吗?哈里

最佳答案

您的脚本无法建立与数据库的连接您还应该将有关 mysql 连接的真实信息插入 db.php 文件

而且你不能输入错误的密码!!!!

这个文件中有一些变量

类似于下面:

$database_hostname = 'localhost (as default) or your server hostname';
$database_username = 'root (as default) or your database username';
$database_password = '(in some local web servers we don't have any password for database but in hosting servers usually we have a defined password ) such as (3R8=&3pHEJ+J)';
$database_name = 'you must insert your database name in here';

$connection_mysql=mysql_connect($database_hostname,$database_username,$database_password);
mysql_select_db($database_name,$connection_mysql);
--------------
or in the simple mode might be similar below:
$connection_mysql=mysql_connect(localhost,your_database_name,your_database_password);
mysql_select_db($database_name,$connection_mysql);

我认为您的信息不正确,请检查您在 db.php 中输入的信息(也有可能是您的帐户被管理员在服务器中暂停或限制)

关于mysql - 无法打开我的主页,而是从 mysql 获取旧的警告消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27194516/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com