I am working on a project using codeigniter. I completed the login and registration coding and works fine on my local computer. But when I upload the files to live server then it gives me following error
A Database Error Occurred
Unable to select the specified database: zafarsal_membership
Filename: core/Loader.php
Line Number: 346
In database.php I have added correct information. And zafarsal_membership database does exist there but still it gives me this error. Could you please help me where am I making mistake?
I was getting the same error... just change the $db['default']['dbdriver'] = 'mysql';
to $db['default']['dbdriver'] = 'mysqli';
Here are the diferences between "mysql" and "mysqli":
Hope it helps you!
Here are the usual suspects:
Does the database user have read/write access to the database?
Did you select the right database driver?
Does your connection to the database succeed?
Are you running the same version of the database server locally and on your server?
In 90% of the cases, it's one of the above.
Related
Im trying to load a database dump into my Sybase backup server.
Running sybase ASE-16_0 on both my primary and backup machine.
Import is done in isql cli via
load database DB from ./dumps/data_dump
Error message is the following:
Backup Server session id is: 22. Use this value when executing the
'sp_volchanged' system stored procedure after fulfilling any volume change
request from the Backup Server.
Backup Server: 4.141.2.40: [11] The 'open' call failed for database/archive
device while working on stripe device
'/opt/dumps/data_dump' with error number
13 (Permission denied). Refer to your operating system documentation for further
details.
Also found this SAP Knowledge Base article, but it's hidden behind a paywall:
https://userapps.support.sap.com/sap/support/knowledge/en/3140989
Setting up a new Server fixed the issue for me. Im still working on a possible answer for this problem.
Bit of background, I need to remake this ColdFusion app in C# so I set up the legacy project on my machine and it was working fine till today, when I messed up running SQL commands (I know I should have used transactions, hindsight is fantastic). So I had a backup I made yesterday so I just deleted the DB I had in my SQLExpress and restored the backup and then I encoutnered the error below.
I don't remember making any changes or setting up anything in the permissions for the database so I don't think it something related to that.
I am getting the below error message when trying to login to the CF app that is running on Lucee, on my local machine.
Message Cannot open database "appName" requested by the login. The login failed. ClientConnectionId:555eb338-984e-4edf-a12b-c0662a0f6068
Stacktrace The Error Occurred in
C:\lucee\tomcat\webapps\appName\admin_cfcs\login.cfc: line 69
called from C:\lucee\tomcat\webapps\appName\admin\authenticate.cfm: line 26
called from C:\lucee\tomcat\webapps\appName\admin\dashboard\dashboard.cfm: line 2
Got the answer thanks to #Larnu 's suggestion in a comment to the questions.
Found the error in the Logs as suggested I had setup a user, for the database and it wasn't assigned to the database when I restored the new copy, so I just had to add the database "appName" to the User Mapping. Thanks :)
I am using below command to create DB link
CREATE DATABASE LINK Dblink_test2
CONNECT TO apps IDENTIFIED BY xyzabc
USING '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=awss007.us.dell.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=xxxmm122de)))';
The DB link got created successfully and it is returning data when I am creating it in on premise database.
But when I am doing same in my Dbaas ,DB link is getting created but when I am running query I am getting below error.
select * from emp#Dblink_test2;
table is there. Same is working when I am creating DB link in on premise database.
Issue is coming when local environment is DBaas and Remote is On premise Database.
Could you please help me on the same?
I replaced hostname by IP address and it worked successfully.
CREATE DATABASE LINK Dblink_test2
CONNECT TO apps IDENTIFIED BY xyzabc
USING '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.32.33.22)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=oam122de)))';
The above one is working fine.
Here i am trying to create a new database and new role/user to that. I created the database called 'testing' now. And I assigned the role/user called 'precision' to that database.
But my site still showing an error like below:
/usr/local/lib/php/kohana-v.2.3.4/system/libraries/drivers/Database/Pgsql.php [48]:
pg_connect(): Unable to connect to PostgreSQL server: ERROR: No such user: precision
If i try the same with anyother database and user then it is working fine.
I am new for Pg-admin and PostgreSQL. Kindly help and let me know What i did wrong. Thanks in advance. :)
I am working on an ios project that has a Sybase (ultralite) database that is synchronized with a Sybase Sql Anywhere 12 database using mobilink.
Everything was properly, until i decided today to add some fields to the main database so that they synchronize to the main database.
I have updated the schema of the consolidated database from the main engine, then i have updated the schema of the remote database from the consolidated engine, and then i mapped the added fields together, and I deployed a new ultralite database.
Please note that it's not the first time I do a similar task, i always add fields, and sync databases..
after the update, when i synchronize using the blank ultralite database, mobilink will fail giving only this error: Synchronization Failed: -1305 (MOBILINK_COMMUNICATIONS_ERROR) %1:201 %2: %3:0
I have researched Error Number 201 in sybase and it points to: SQLE_NOT_PUBLIC_ID
and in the sybase documentation the error's probably cause is:
"The option specified in the SET OPTION statement is PUBLIC only. You cannot define this option for any other user."
I have tried to redeploy, I have tried to move the engine to a windows pc, all give the same error.. and i have no clue where this SET OPTION statement came from and how can i solve it..
Any hints are appreciated!
The problem was just caused by small network timeout value while setting up mobilink parameters.
info.stream_parms = (char*) #"host=192.168.0.100;port=3309;timeout=1"
i just changed the value from timeout=1 to timeout=300 and it worked!