Monday 11 October 2021

Joins exercises in sql sql videos in telugu part 02 69

python --version
python -m pip install mysql-connector-python
Test MySQL Connector
To test if the installation was successful, or if you already have "MySQL Connector" installed, create a Python page with the following content:

import mysql.connector

Create Connection
Start by creating a connection to the database.

Use the username and password from your MySQL database:

import mysql.connector

mydb = mysql.connector.connect(


Microsoft Windows [Version 10.0.19042.1110]
(c) Microsoft Corporation. All rights reserved.

C:\Users\VLR Training>python --version
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.

C:\Users\VLR Training>python

C:\Users\VLR Training>python --version
Python 3.9.6

C:\Users\VLR Training>python -m pip install mysql-connector-python
Collecting mysql-connector-python
  Downloading mysql_connector_python-8.0.26-cp39-cp39-win_amd64.whl (799 kB)
     |████████████████████████████████| 799 kB 2.2 MB/s
Collecting protobuf>=3.0.0
  Downloading protobuf-3.17.3-cp39-cp39-win_amd64.whl (909 kB)
     |████████████████████████████████| 909 kB 6.4 MB/s
Collecting six>=1.9
  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Installing collected packages: six, protobuf, mysql-connector-python
Successfully installed mysql-connector-python-8.0.26 protobuf-3.17.3 six-1.16.0
WARNING: You are using pip version 21.1.3; however, version 21.2.2 is available.
You should consider upgrading via the 'C:\Users\VLR Training\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe -m pip install --upgrade pip' command.

C:\Users\VLR Training>cd desktop

C:\Users\VLR Training\Desktop>pyton
'pyton' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\VLR Training\Desktop>python

C:\Users\VLR Training\Desktop>python
  File "C:\Users\VLR Training\Desktop\", line 10

SyntaxError: unexpected EOF while parsing

C:\Users\VLR Training\Desktop>python
<mysql.connector.connection.MySQLConnection object at 0x000001C935AF1BE0>

C:\Users\VLR Training\Desktop>

No comments:

Post a Comment

Note: only a member of this blog may post a comment.