Adminer changes the name of the foreign key when I change its cascade options - mariadb

I'm using Adminer to manage my MariaDB database.
There is a problem though. When I want to change a foreign key that has a name, it changes the name to its default.
How can I prevent that?
I need the name of my foreign keys to remain what I have named them, because of some policies that exist in my company and from our customers.

Related

Partial revokes with MariaDB

I want to use MySQL partial revokes in MariaDB, but there does not seem to be any reference of it in the docs, so is there are workaround?
I grant user foo privileges on *.*, and I want to partially revoke its permission to select column password on table users - how can I do this?
CREATE USER 'foo'#'%' IDENTIFIED BY 'password';
GRANT SELECT, INSERT, DELETE, UPDATE ON *.* TO 'foo'#'%';
REVOKE SELECT (password) ON production.users FROM 'foo'#'%';
Such thing results in:
ERROR 1147 (42000): There is no such grant defined for user 'foo' on host '%' on table 'user'
Version: 10.3.31-MariaDB-0+deb10u1-log
Perhaps I could do something like this easily with roles? If so, can you give examples to do so?
MDEV-14443 negative grants is actively being worked on so hopefully 10.9.
At the moment creating the grants excluding your password is one option.
The other is putting the password (by which I hope you mean a uniquely salted hash or KDF) in a different table.

"No privilege" when creating table with Organization index

I am running Oracle 11.g and the id I am using has DBA role (full access supposedly).
When I tried to create a table under another schema, it works fine. However, when I tried to create a table with organization index, I was prompted
ORA-01950: no privileges on tablespace
I double checked my id has unlimited tablespace. My ID and the targeted schema are both in the same tablespace.
Supplemental info: I am able to run the same creat table statement w/ organization index under my own schema.
Creating objects may require two privileges: your user needs privileges to create the objects, and the schema owner needs privileges to use resources related to that object. So while you have the ability to create a table in another schema, that schema also needs the privileges to write data to the related tablespaces:
alter user $username quota unlimited on $tablespace;
This approach is safer than granting the UNLIMITED TABLESPACE role. That role grants more than necessary, and if someone later tries to cleanup the privileges, revoking that role also undoes individual privileges, as described in this article.
I granted the targeted schedma unlimited tablespace and it's resolved.

Encrypt some fields of an object using Realm Database

How can we encrypt only some fields which are sensitive in Realm database? For example, I have an object called Person with fields like name, age, SSN to be stored in Realm Database. I want to encrypt sensitive field like SSN and store it in the Realm Database.
Any ideas how can we do it?
Also, Realm provides the use of Realm-annotations like Primary Key, Required etc which can be used for the fields. Is there a way to create a new annotation for sensitive field and then process those?

Referencing authentication db data in real time db firebase

I am making a website with login and registration facility using firebase. I have used firebase "Authentication" database to store the registered users.However, "Authentication" database doesnt store anything other then emailid, password and an auto generated UUID.
I need to store more data like username, profile pic etc for a user. I would be using firebase's "real time" database for the same.
My question is what is the best practise to do the same. Should I use the UID as primary key from "authentication" database and keep it as foreign key in my real time database like below:
Authentication db:
Record 1 - Email:abc#test.com; password:somepassword; UID:UID1
Record 2 - Email:abcd#test.com; password:somepassword; UID:UID2
RealTime db structure:
users
|
|--UID1
|
|---Name:Amanda
|---Surname:Waller
|---age:30
|--UID2
|
|---Name:MyName
|---Surname:Mysurname
|---age:39
Or is it better to use email id as primary key instead of using firebase's auto-generated UID. Because in sql we do not generally use the autogenerated ids as primary keys.
It’s better to use the UID. For one thing, you can’t have periods in keys, so if you use email as a key you’ll have to handle that by replacing them with some other character. Also, some forms of authentication don’t require email, like Twitter. Since you can get the UID easily once the user is authenticated, that’s what I’d recommend.

How do you change a user's email address in Phabricator

I've set up phabricator and added several users. I noticed that I can change a user's real name or username, but I am unable to change their email address. Is there some reason why this is not exposed to admins? Is there a server setting that allows admins to change email addresses.
You need to update the mysql database. In the phabricator_user db alter your email address in the user_email table. Administrators may not be all-powerful, but DBAs are.
Administrators can not change email addresses because it would let them change a user's email address to their own, reset the user's password, and then log in as the user. Administrators are not all-powerful in Phabricator's permission model, and can not compromise accounts, act as other users, or violate policies.
If you need to change an address because you made a mistake when creating a new account, you can delete the account and recreate it.
As bridiver writes, you need to change the address directly in the database. For that, you can use a helper Phabricator script to connect to the database:
$ phabricator/bin/storage shell
[...]
mysql> use phabricator_user;
Database changed
mysql> update user_email set address='newaddress#example.com' where address='oldaddress#example.com';
Query OK, 1 row affected (0.05 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> quit
It might be new, but they have a way now. I'll just list it here in case anyone has the same question later.
Log in to the server, where you have your Phabricator install, and use ./bin/accountadmin. That will let you change or add accounts at will. If you just want to look at the user, you can look in the phabricator_user database and check the user table or the user_profile table.

Resources