--> -->
 
 
InternalError
Python 3.6.9: /usr/bin/python
Fri Apr 10 00:05:33 2020

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

 /var/www/html/index.py in <module>()
     15     user='root',
     16     passwd='your_root_mysql_password',
=>   17     host='localhost')
     18 c = conn.cursor()
     19 
host undefined
 /usr/local/lib/python3.6/dist-packages/pymysql/__init__.py in Connect(*args=(), **kwargs={'db': 'example', 'host': 'localhost', 'passwd': 'your_root_mysql_password', 'user': 'root'})
     92     """
     93     from .connections import Connection
=>   94     return Connection(*args, **kwargs)
     95 
     96 from . import connections as _orig_conn
Connection = <class 'pymysql.connections.Connection'>, args = (), kwargs = {'db': 'example', 'host': 'localhost', 'passwd': 'your_root_mysql_password', 'user': 'root'}
 /usr/local/lib/python3.6/dist-packages/pymysql/connections.py in __init__(self=<pymysql.connections.Connection object>, host='localhost', user='root', password='your_root_mysql_password', database='example', port=0, unix_socket=None, charset='', sql_mode=None, read_default_file=None, conv={<class 'bool'>: <function escape_bool>, <class 'int'>: <function escape_int>, <class 'float'>: <function escape_float>, <class 'str'>: <function escape_unicode>, <class 'tuple'>: <function escape_sequence>, <class 'list'>: <function escape_sequence>, <class 'set'>: <function escape_sequence>, <class 'frozenset'>: <function escape_sequence>, <class 'dict'>: <function escape_dict>, <class 'NoneType'>: <function escape_None>, ...}, use_unicode=True, client_flag=3842573, cursorclass=<class 'pymysql.cursors.Cursor'>, init_command=None, connect_timeout=10, ssl=None, read_default_group=None, compress=None, named_pipe=None, autocommit=False, db='example', passwd='your_root_mysql_password', local_infile=False, max_allowed_packet=16777216, defer_connect=False, auth_plugin_map=None, read_timeout=None, write_timeout=None, bind_address=None, binary_prefix=False, program_name=None, server_public_key=None)
    323             self._sock = None
    324         else:
=>  325             self.connect()
    326 
    327     def _create_ssl_ctx(self, sslp):
self = <pymysql.connections.Connection object>, self.connect = <bound method Connection.connect of <pymysql.connections.Connection object>>
 /usr/local/lib/python3.6/dist-packages/pymysql/connections.py in connect(self=<pymysql.connections.Connection object>, sock=<socket.socket [closed] fd=-1, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6>)
    597 
    598             self._get_server_information()
=>  599             self._request_authentication()
    600 
    601             if self.sql_mode is not None:
self = <pymysql.connections.Connection object>, self._request_authentication = <bound method Connection._request_authentication of <pymysql.connections.Connection object>>
 /usr/local/lib/python3.6/dist-packages/pymysql/connections.py in _request_authentication(self=<pymysql.connections.Connection object>)
    859 
    860         self.write_packet(data)
=>  861         auth_packet = self._read_packet()
    862 
    863         # if authentication method isn't accepted the first byte
auth_packet undefined, self = <pymysql.connections.Connection object>, self._read_packet = <bound method Connection._read_packet of <pymysql.connections.Connection object>>
 /usr/local/lib/python3.6/dist-packages/pymysql/connections.py in _read_packet(self=<pymysql.connections.Connection object>, packet_type=<class 'pymysql.protocol.MysqlPacket'>)
    682 
    683         packet = packet_type(buff, self.encoding)
=>  684         packet.check_error()
    685         return packet
    686 
packet = <pymysql.protocol.MysqlPacket object>, packet.check_error = <bound method MysqlPacket.check_error of <pymysql.protocol.MysqlPacket object>>
 /usr/local/lib/python3.6/dist-packages/pymysql/protocol.py in check_error(self=<pymysql.protocol.MysqlPacket object>)
    218             errno = self.read_uint16()
    219             if DEBUG: print("errno =", errno)
=>  220             err.raise_mysql_exception(self._data)
    221 
    222     def dump(self):
global err = <module 'pymysql.err' from '/usr/local/lib/python3.6/dist-packages/pymysql/err.py'>, err.raise_mysql_exception = <function raise_mysql_exception>, self = <pymysql.protocol.MysqlPacket object>, self._data = b"\xff\xa2\x06#28000Access denied for user 'root'@'localhost'"
 /usr/local/lib/python3.6/dist-packages/pymysql/err.py in raise_mysql_exception(data=b"\xff\xa2\x06#28000Access denied for user 'root'@'localhost'")
    105         errval = data[9:].decode('utf-8', 'replace')
    106     else:
    107         errval = data[3:].decode('utf-8', 'replace')
    108     errorclass = error_map.get(errno, InternalError)
=>  109     raise errorclass(errno, errval)
errorclass = <class 'pymysql.err.InternalError'>, errno = 1698, errval = "Access denied for user 'root'@'localhost'"

InternalError: (1698, "Access denied for user 'root'@'localhost'")
      args = (1698, "Access denied for user 'root'@'localhost'")
      with_traceback = <built-in method with_traceback of InternalError object>