这样不行,报错:
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
Traceback (most recent call last):
File "dba_script.py", line 1824, in <module>
main(sys.argv)
File "dba_script.py", line 1811, in main
xa_sqlObj.create_rangerdb_user(xa_db_root_user, db_user, db_password, xa_db_root_password,dryMode)
File "dba_script.py", line 230, in create_rangerdb_user
if self.check_connection('mysql', root_user, db_root_password):
File "dba_script.py", line 222, in check_connection
if output.strip('Production |'):