db2=>connect to mytest user knellim using xxxx
Database Connection Information
Database server = Apache Derby CSS10050
SQL authorization ID = KNELLIM
Local database alias = MYTEST
When I connect to the same DB in PHP as cataloged or uncataloged, I get
this:
Connection to database failed.
SQLSTATE:
Message:
Below is my script
Expand|Select|Wrap|Line Numbers
- <?php
- $database = 'mytest';
- $user = 'knellim';
- $password = 'xxxx';
- $conn = db2_connect($database, $user, $password);
- if ($conn) {
- echo "Connection succeeded.";
- db2_close($conn);
- }
- else {
- echo "Connection failed.<p>";
- echo 'SQLSTATE: ' . db2_conn_error() . '<br />';
- echo 'Message: ' . db2_conn_errormsg(). '<br />';
- }
- ?>
I installed Apache using yum install httpd -y
Please suggest what can be the problem...
Thanks