查找网站搬迁错误Unable to connect to your database server using the provided settings
来源:互联网 发布:人工智能的未来 mobi 编辑:程序博客网 时间:2024/05/17 21:51
http://www.php230.com/codeigniter-appear-unable-to-connect-to-your-database-server-using-the-provided-settings-error.html
解决过程:
在config/database.php最后加上如下代码进行调试。
echo '<pre>';
print_r($db['default']);echo '</pre>';
echo 'Trying to connect to database: ' .$db['default']['database'];
$dbh=mysql_connect
(
$db['default']['hostname'],
$db['default']['username'],
$db['default']['password'])
or die('Cannot connect to the database because: ' . mysql_error());
mysql_select_db ($db['default']['database']);
echo '<br /> Connected OK:' ;
die( 'file: ' .__FILE__ . '--> Line: ' .__LINE__);
输出后发现 , 提示:不能连接数据库。 改正确后, hostname 应该是远程数据库地址
0 0
- 查找网站搬迁错误Unable to connect to your database server using the provided settings
- Codeigniter 报错 Unable to connect to your database server using the provided settings
- Unable to connect to database server:specified database is invalid 错误修复方法
- TSM错误:ANR1820E The server could not connect to the database manager by using TCP/IP port 51500.
- 解决“unable to connect to your virtual device” 错误
- C028: "Unable to Connect to the Siebel Gateway Name Server
- Unable to connect to the remote server 问题
- Using the data layer API to query your Kentico database
- Ranger错误:Unable to connect to Hive Thrift Server instance..
- FreeOTFE的Unable to connect to the FreeOTFE driver错误
- PB报unable to load the requested database interface错误
- PowerBuilder经典错误unable to load the requested database interface
- unable to connect to converter enterprise server
- Unable to connect to specified host. 错误
- Linux上 Can't connect to X11 window server using XX as the value of the DISPLAY 错误解决方法
- hive----MetaException(message:Could not connect to meta store using any of the URIs provided. Most r
- GPDB gprecoverseg -F Unable to connect to database
- Genymotion运行问题:Unable to connect to your virtual device
- Android Lint工具
- mybatis与hibernate比较
- cable master POJ 1064
- beego框架获取http请求内容
- 19、MySQL-查询表达式
- 查找网站搬迁错误Unable to connect to your database server using the provided settings
- Ubuntu 配置 Android 开发环境遇到的问题
- [LeetCode] 028. Implement strStr() (Easy) (C++/Python)
- FlappyBird开发总结(六)—— 计分制的实现
- Scala 点滴:参数序列 : _ *
- Qt开发 槽函数定义,以及槽函数二次响应多次响应问题
- 20、MySQL-带条件查询(WHERE)
- Openstack development trend
- 程序员必须知道的10大基础实用算法及其讲解