Change passwords in Oracle with Python

Write the contents out to a CSV file import sys import cx_Oracle import os def printf (format,*args): sys.stdout.write (format % args) def printException (exception): error, = exception.args printf (“Error code = %s\n”,error.code); printf (“Error message = %s\n”,error.message); username = sys.argv[1] password = sys.argv[2] databaseName = sys.argv[3] new_user = sys.argv[4] new_password = sys.argv[5] print(‘Connecting to ‘ … Read more

How to change a MYSQL User Password

Solution Step 1. Login to the relevant server as any user and login to mysql as described below cd /usr/local/mysql/bin ./mysql -uroot Change the user password update mysql.user set password=’indreport’ where user=’indreport’; Query OK, 0 rows affected (0.11 sec) Rows matched: 1 Changed: 0 Warnings: 0 mysql> commit; Query OK, 0 rows affected (0.00 sec)