How to create a database in cpanel using codignter using migrations - codeigniter

I am using dbForge to create a dynamic database in cPanel using CodeIgnter, and I'm getting this error:
A Database Error Occurred
Error Number: 1044
Access denied for user '************'#'localhost' to database 'informsa_inform_sap_10000'
CREATE DATABASE `informsa_inform_sap_10000` CHARACTER SET utf8 COLLATE utf8_general_ci
What does it mean?

you need to give privileges to the database user you created;
cpanel / database users can go and edit privileges.
or create a new database user and define all privileges

Related

Oracle - unable to create DB link

I am unable to create the DB link as it's throwing ORA - 01031 insufficient privileges error.
Let's say I have database DB1 and schema name as s1 and second database as DB2 with schema t1.
I am trying to create the DB link by sysdba user by running below -
alter session set current_schema=s1;
Create database_link dblinkname connect to t1 identified by password using DB2;
But this is giving me error. I tried giving privileges also to s1 but no luck. Any leads. I don't have the schema password for s1 and I can't reset it as it's production environment.
I had the same issue a several years ago.
Assuming, you don't want to create a public database link...
You can do this:
Grant privilege create database link to target schema.
Create a stored procedure in your target schema, which creates database link per execute immediate
Call this procedure
Finally drop this procedure.

PostgreSQL said: permission denied for schema

I have a multi-tenant PostgreSQL db on a Ruby on Rails app, and when I try to access to tables on some schemas on Postico, I get the following error:
Failed to load table schema.
Query failed
PostgreSQL said: permission denied for schema coaching
I tried to run: GRANT USAGE ON SCHEMA "lacerba-api" TO "postico7" but I get ERROR: permission denied for schema lacerba-api
Of course my user have writing permission on the db.
Any idea how to solve it?
My guess is that your user doesn't have permission to read tables in the coaching schema. You can try granting your user permission to read tables in that schema:
GRANT SELECT ON SCHEMA coaching TO postico7

What is the significance of connect role in oracle

What is the purpose of connect role in oracle.
select * from role_sys_privs where role='CONNECT';
ROLE PRIVILEGE ADMIN_OPTION
CONNECT CREATE SESSION NO
So based on the above information it is used to create session.
But i can find users who don't have the role of CONNECT but can still access the database.
So what is this CREATE SESSION about? and what can it do? is it necessary for all the users?
According to the Database Security Guide, the CONNECT ROLE was changed in Oracle Database 10.2:
The CONNECT role was originally established a special set of privileges.
These privileges were as follows:
ALTER SESSION
CREATE SESSION
CREATE CLUSTER
CREATE SYNONYM
CREATE DATABASE LINK
CREATE TABLE
CREATE SEQUENCE
CREATE VIEW
Beginning in Oracle Database 10g Release 2, the CONNECT role has only the CREATE SESSION privilege, all other privileges are removed.

How to create a database in Oracle using JDBC?

I want to create a new database on an Oracle server via JDBC. I cannot seem to connect to the database without providing an SID: using a URL like jdbc:oracle:thin:#//[IP]:1521 results in an error of "ORA-12504, TNS:listener was not given the SID in CONNECT_DATA"
Alternatively, if I log into a specific SID, I can run most DDL commands except for CREATE DATABASE foo which fails with an error of "ORA-01100: database already mounted"
How am I supposed to create a database if I cannot connect to the server without specifying a specific database and cannot create a database if I am already logged into a specific database?
AFAIK creating a database needs an internal and direct connection which can only be done by logging in directly on the server (normally a user account called 'oracle').
One reason for that: users are stored in the database itself. No database = no user to connect to by an external client.
Please also note Justin's comment about oracles database schemas. This is probably what you are looking for
What you need are following commands:
CREATE TABLESPACE CREATE USER and few GRANT ... TO ... -- to have rights to connect and create objects, at least

I need help setting up a connection for digitalocean managed database in laravel

I created a mysql cluster and I have been having issues setting up a connection between the database and my project.
Create DB and User within DigitalOcen
and then run the command below :
GRANT ALL ON DB_NAME TO 'USER_NAME'#'%' WITH GRANT OPTION;
ALTER USER 'USER_NAME' IDENTIFIED WITH mysql_native_password BY 'GIVE_THE_PASSWORD';
Laravel Connection :
DB_CONNECTION=mysql
DB_HOST=As given on DO managed DB
DB_PORT=As given on DO managed DB
DB_DATABASE=give the name of the database that you created within DO and want to use here
DB_USERNAME=give the name of the user that you created within DO and want to use here
DB_PASSWORD=give the pass of the database that has been created automatically while create DB

Resources