1. >>> conn=mysql.connector.connect(user='root', password=' ', host='localhost', database'=pth1' )

    File "<pyshell#32>", line 2
    conn=mysql.connector.connect(user='root', password=' ', host='localhost', database'=pth1' )
    IndentationError: unexpected indent
    >>> conn=mysql.connector.connect(user='root', password=' ', host='localhost', database'=pth1' )
    SyntaxError: invalid syntax
    >>> conn=mysql.connector.connect(user='root', password=' ', host='localhost')

    Traceback (most recent call last):
    File "<pyshell#34>", line 1, in <module>
    conn=mysql.connector.connect(user='root', password=' ', host='localhost')
    File "C:Python27libsite-packagesmysqlconnector__init__.py", line 179, in connect
    return MySQLConnection(*args, **kwargs)
    File "C:Python27libsite-packagesmysqlconnectorconnection.py", line 94, in _init_
    File "C:Python27libsite-packagesmysqlconnectorabstracts.py", line 722, in connect
    File "C:Python27libsite-packagesmysqlconnectorconnection.py", line 211, in _open_connection
    File "C:Python27libsite-packagesmysqlconnectorconnection.py", line 143, in _do_auth
    self._auth_switch_request(username, password)
    File "C:Python27libsite-packagesmysqlconnectorconnection.py", line 176, in _auth_switch_request
    raise errors.get_exception(packet)
    ProgrammingError: 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

  2. Good morning/afternoon/evening (depending on the time you see my comment)
    Great tutorial.
    I am picking up Python coding and your videos are a great start (I have not coded in Python since my freshman year of college).

  3. I m using Mac OS X 10.12.3 and I installed python mysql connector 2.1.5 , but it is not importing on shell, although it got imported on terminal with python3.6. How to import it on shell ? please if any one can help…..

  4. I have no words to express my happiness.
    Thank you so much for this wealth of information and that to free of cost.
    I was struggling with this since 3 days, but finally saw your solution.

    Your command over the language is termendous.

    Good luck and god bless


  5. Hi !
    Thanks a lot for the great tutorial..
    Am getting some error

    Traceback (most recent call last):
      File "C:/Python34/smtp.py", line 16, in <module>
      File "C:Python34libsmtplib.py", line 242, in _init_
        (code, msg) = self.connect(host, port)
      File "C:Python34libsmtplib.py", line 321, in connect
        self.sock = self._get_socket(host, port, self.timeout)
      File "C:Python34libsmtplib.py", line 292, in _get_socket
      File "C:Python34libsocket.py", line 512, in create_connection
        raise err
      File "C:Python34libsocket.py", line 503, in create_connection
    ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it

    Could you tell me in detail

Leave a Reply

Your email address will not be published.