当我尝试从本地的XAMPP php连接到远程mysql数据库时,它说
Warning: mysql_connect() [function.mysql-connect]: Unknown MySQL server host
'testhost.testserver.com' (11004) in D:\xampp\htdocs\cvsprojects\test\initdb.php
on line 24
我确信mysql主机、用户名、密码是正确的,可以连接。
当我试图从XAMPP运行phpMyAdmin时,我得到了这个错误。在我安装和运行XAMPP之前,这台机器上已经安装了mysql。当我启动XAMPP时,mysql和apache2都启动成功。我可以使用PHP脚本访问mysql数据库,但不能通过phpmyadmin访问。
Error
MySQL said: Documentation
#1045 - Access denied for user 'root'@'localhost' (using password: NO)
phpMyAdmin tried to connect to the MySQL serve
我已经在本地服务器pc上安装了xampp。
我试图通过mysqlworkbench从1台pc访问数据库到其他PC(服务器)。
但是它给出了下面的错误
Connecting to MySQL server 192.168.0.102...
Host 'KILL3RCODER-LAP' is not allowed to connect to this MySQL server
我试图搜索它,并对httpd-xampp.conf文件进行了更改。下面是我的conf文件,但我还是遇到了同样的问题:
#
# XAMPP settings
#
<IfModule env_modu
我在局域网上连接了两台计算机,我想模拟一个客户端服务器类型的配置.So,假设我以pc1作为服务器,pc2作为客户端,我在pc1上创建了一个数据库,并在pc2 .so上保留了注册表单,每当我执行注册脚本时,就会出现以下错误。
未能连接到MySQL:不允许主机'192.168.2.6‘连接到此MySQL服务器
这是我用运行xampp的pc1(server)的ip地址替换数据库主机的注册代码。
<?php
define('DB_HOST', '192.168.2.7');//192.168.2.7 is the ip address of my
我已经在我的Windows XP上安装了XAMPP。我启动了XAMPP控制面板,它显示apache和mysql正在运行。
当我通过转到localhost/xampp检查状态时,它显示:
mysql : deactivated
当我运行访问mysql数据库的php文件时,它显示以下错误:
Warning: mysql_connect() [function.mysql-connect]: [2002] No connection could
be made because the target machine actively refused it. (trying to connect
v
生产环境下,我登录mySQL数据库后,上面显示的IP如下:
服务器: Localhost via UNIX socket
服务器类型: MySQL
服务器版本: 5.7.18 - MySQL Community Server (GPL)
协议版本: 10
用户: root@localhost
服务器字符集: UTF-8 Unicode (utf8)
[附加信息]
我刚买了Coda 2,我想试一下mysql数据库连接的这个功能。我无法连接。出现的错误是:
Unable to connect to host 1.2.3.4, or the request timed out.
Be sure that the address is correct and that you have the necessary privileges,
or try increasing the connection timeout (currently 0 seconds).
MySQL said: Can't connect to MySQL server on
当我在本地主机XAMPP上访问mysql数据库时,我通常会键入
mysql -u用户-p
但今天我不小心把它打错了:
mysql -u用户-p
对我来说,没有任何密码提示就连接上了。我尝试过在mysql中注册的许多用户,看起来他们都是这样打开的。这是XAMPP的错误或漏洞,还是控制面板中集成的shell应用程序的正常行为?如果是第二个,我如何更改它,因为使用我的计算机的其他任何人都可以轻松地访问我服务器上的任何数据库和表。