我无法连接到由主机提供商保存的MySQL数据库。
我已经在cPanel中正确设置了帐户,以便在从php服务器运行php代码时能够连接到数据库。
但是现在我想通过Mac上的数据库工具而不是phpmyadmin来访问它。我添加了我的IP ( IP和DNS名称.)到cPanel中的“远程数据库访问主机”。我已经尝试从PHP和直接连接。我总是得到:
MySQL Said: Can't connect to MySQL server on 'xxx.xxx.xxx.xxx' (4)
Use the following configuration settings for con
我正在设置一个PHP脚本,该脚本连接到本地系统上的4D数据库。
然而,我一直收到:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000] [1044] Access denied for user ''@'localhost' to database 'tester'' in /Applications/MAMP/htdocs/4d/index.php:8 Stack trace: #0 /Applications/
我想从php连接到postgres的远程数据库,但它无法连接,并说
Warning: pg_connect() [function.pg-connect]: Unable to connect to PostgreSQL server:
could not connect to server: No route to host (0x00002751/10065) Is the server running on host "xxxxxxxxx" and accepting TCP/IP connections on port 5432? in C:\xampp\ht
我在服务器上连接蛋糕php版本-2.0.0-dev应用程序时遇到问题。当我连接本地主机数据库时,它在服务器上工作得很好,但如果我尝试将它连接到另一台主机托管的不同服务器的数据库,它会给出以下错误:
Fatal error: Call to a member function getAttribute() on a non-object in
/home/dev.ukssmain/public_html/stock_system_ukrs/cake/libs/model/datasources/dbo/dbo_mysql.php
on line 259**
我在database.php文件中的配
我无法从我的PHP脚本连接到我的本地MySQL数据库。
我可以从命令行使用以下命令进行连接
mysql --host=127.0.0.1 --port=8889 --user=root -p
但是当我使用下面的代码从我的PHP脚本连接时,它不工作
$dbc = @mysqli_connect ('localhost:8889', 'root', 'root', 'test') OR die ('<p>Could not connect to the database!</p></body>