Error: Views\Synonyms required for XA transaction support are missing in this Database 12c

To resolve the above issue, follow below steps:-

As SYS user, enable Oracle database for XA by performing the following steps:

sqlplus / as sysdba

SQL>@$ORACLE_HOME/javavm/install/initxa.sql 
PL/SQL procedure successfully completed.
Execute $ORACLE_HOME/rdbms/admin/xaview.sql

SQL> @xaview.sql
DROP VIEW v$xatrans$
*
ERROR at line 1:
ORA-00942: table or view does not exist
DROP VIEW v$pending_xatrans$
*
ERROR at line 1:
ORA-00942: table or view does not exist
View created.
View created.
SQL>

How to fix: ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)

Open your terminal and type mysql -u root -p Enter your password. Hopefully your MySQL is logged in now.