0

I want to convert the SQL script from SQL Server to MariaDB of the following below but I can't figure out.

IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'client')

CREATE USER `client` FOR LOGIN `client` WITH DEFAULT_SCHEMA=`dbo`;'

ALTER ROLE `db_client` ADD MEMBER `client`

ALTER AUTHORIZATION
    ON [ <class_type>:: ] entity_name
    TO { principal_name | SCHEMA OWNER }
    [;]

What is the best way to migrate SQL Server to MariaDB?

Or any equivalent of MariaDB?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
amstriker
  • 339
  • 7
  • 19
  • The best way is to get clear about what you are trying to accomplish, then consult the official documentation. – Dale K Sep 09 '21 at 03:53
  • MySQL / MariaDB does not have a two level security principals... So the transposition of one into the other is impossible in such a strict way – SQLpro Oct 07 '21 at 15:09

0 Answers0