How do I add a super user same as 'root'#'localhost' - connection

I want to add a super user that has the same privileges as 'root'#'localhost' because I want to create a host that is '%' accessible that my local machine will serve as a remote database server.
P.S. I am using xampp > phpmyadmin

You have to do something like this
CREATE USER 'jeffrey'#'localhost' IDENTIFIED BY 'mypass';
GRANT ALL ON db1.* TO 'jeffrey'#'localhost';
GRANT SELECT ON db2.invoice TO 'jeffrey'#'localhost';
GRANT USAGE ON *.* TO 'jeffrey'#'localhost' WITH MAX_QUERIES_PER_HOUR 90;
Refer the docs here.

Related

How to grant the privilege of assigning privileges in Neo4J

I was given access to a database (turtwig) in Neo4j created by a colleage, who gave me the default role 'PUBLIC' and a custom one called 'modeller'. I am triying to create a new node label but I get this message:
Node label error
When I try to give myself the privilage to create node labels, an error occurs:GRANT ERROR. This same error occurs when I try to grant myself the privileges of assigning privileges with GRANT ASSIGN PRIVILEGE ON DBMS TO modeller
Run this command and you will see the privileges that user modeller has.
SHOW USER PRIVILEGES
Granting yourself (as modeller) access for that privilege should be done by admin. Then you should ask your database admin (or colleague) to grant you access to create new nodes.
GRANT CREATE ON GRAPH turtwig ELEMENTS * TO modeller

Create User in InfluxDB v2 with role owner or assign role to a user later

I was wondering if someone know if there is a way to use the InfluxDB v2 cli to create a user, assign to a organization and assign the role owner or change the role of a user later.
It seems that there is an API option but not at the CLI.
Also in the UI there seems to be no way to change the role of a user.
It is a little bit tricky and not self explaining but this command here does the job:
influx auth create --all-access -u <userNeedingPermission> -o <theorg>
The user will than not be marked as owner but has complete rights on the platform.

ddev: how to modify database credentials

ddev has these default settings:
database: db
dbuser: db
password: db
I thought it should be possible to provide customized values for that (I know it doesn't make too much sense, but still). I was looking for these settings in config.yaml, but no luck.
Is it possible to modify those credentials and add them to git?
You can change database credentials any time if it seems useful to you. You have full root on the mysql database. So ddev mysql -uroot -proot will get you in there where you can GRANT ALL on db.* to 'mynewuser'#'%' IDENTIFIED BY 'mynewpassword'; That will create a new user with full privs on the 'db' database. But you can also create new databases and new users as much as you want. And if you want, you can change the password of the 'db' user. We try to make it as simple as possible for local dev... but if you want to make it more complicated, go for it!
There are a couple of items in the FAQ that may help as well - about multiple databases and database credentials.
If you remove the default credentials, of coures, you have to change your CMS's settings files to credentials that will work.

Is there any user level privilege in Informix?

As I read, there are certain access privileges given to a user or role in Informix. If I give any of the database level privilege, it will have access to all users/ schemas under that database.
My doubt was that can I restrict this privilege to specific users/ schemas in that database? Do we have any user/schema level privilege in Informix?
If you grant a user CONNECT privilege to a database, then they can access tables within that database for which they have been granted access (which is typically, but not necessarily, all tables in the database). You can also revoke PUBLIC privileges on a table, and then grant access only to named users or roles, and then only those users who have been granted access can access it. Here, "access" means "if they try to SELECT, they need to have been granted SELECT access; if they try to INSERT, they need to have been granted INSERT access; etc.".
By default, when you create a table in an ordinary database, then all users are given select, insert, update, delete privileges on the table. This is done via the equivalent of GRANT ALL ON the_table TO PUBLIC. Note that every user has the permissions granted to PUBLIC, and possibly some extra privileges. Therefore, to ensure only selected users or roles have access, it is necessary to use REVOKE ALL ON the_table FROM PUBLIC. There is an environment variable NODEFDAC=1 and a $ONCONFIG file setting with the same name that suppresses the default 'discretionary access controls' (DAC) granted to PUBLIC. Note that in a MODE ANSI database, no permissions are granted to anyone else by default.
The constraints on users granted RESOURCE privilege in a database are similar users granted CONNECT privilege — the difference is that RESOURCE users can create their own tables, whereas CONNECT users cannot.
If a user is granted DBA privilege, they can access any tables in the database. Be cautious about granting DBA privilege, therefore.

mongoDB and rails - privileges and roles needed for a web user

I'm setting up user authentication on mongoDB and would like my rails app to still be able to communicate to the DB.
I have the configurations set properly as far as I know, but get the error Not authorized on <db> to excecute command { distinct: "<collection>", key: "<field_name>", query: {} }
Currently I am using 'webUser' with readWrite privileges.
What mongoDB privilege do I need to grant the web user to run this query?
Btw, I do have auth_source, username, password, roles declared properly in mongoid.yml
Thanks in advance!
Update - screenshot of db users:

Resources