#73 Python Database Connection | MySQL

Поделиться
HTML-код
  • Опубликовано: 17 дек 2024

Комментарии • 557

  • @darshaanaghicha8023
    @darshaanaghicha8023 2 года назад +15

    One correction, if you are watching in 2022 @04:00 you might be getting "Authentication plugin 'caching_sha2_password' is not supported" error.
    Just uninstall mysql-connector & install mysql-connector-python.

  • @krishnajunk
    @krishnajunk 6 лет назад +52

    I watched whole of these Python playlist and learnt the Python for FREE. Thanks a lot. Appreciate your teaching and work :-)

  • @jdiez7092
    @jdiez7092 4 года назад +38

    Probably the best explanation of how to connect to MySQL ever !!

  • @meghanam7550
    @meghanam7550 3 года назад +18

    I learnt python by seeing all your videos . Hats off to you sir 👏

  • @ValorantEdits
    @ValorantEdits 3 года назад +18

    Who all are watching 1 day before Practical exam

  • @swadhikarc7858
    @swadhikarc7858 5 лет назад +10

    Couple of years ago I used to be your channel fan for Java. However, now you're rocking in python. You're definitely a master of all trades. Kudos you talent

  • @sagarrao79
    @sagarrao79 5 лет назад +4

    Pychram or Sublime error:
    if you have mysql 8.0.15 version , then you need to have mysql connector-8.0.15
    Open Pycharm go to File->Settings-> Preferences->Project->Python Interpreter inside Pycharm, and search for mysql-connector-python and select version as 8.0.15 from dropdown list and click in install.
    for Sublime:
    go to command prompt, uninstall any old mysql connector
    pip3 uninstall mysql-connector
    C:\Users\Sanju>pip3 uninstall mysql-connector
    pip3 install mysql-connector-python
    C:\Users\Sanju>pip3 uninstall mysql-connector-python

    • @gamkht
      @gamkht 5 лет назад

      Thank you very much! I had the problem ' Authentication plugin 'caching_sha2_password' is not supported' and this fixed it for me

  • @kerthikeyan7346
    @kerthikeyan7346 3 года назад +1

    really you are alien......helped me a lot everytime I search something I am ending up with your solution....its really working out for me....

  • @kanishkmewal3885
    @kanishkmewal3885 4 года назад +10

    Visual Studio is Baap! 🔥
    Using it since i was 13 years old

    • @Ian-pc2mn
      @Ian-pc2mn 3 года назад +1

      how do
      you connect with vs

    • @abhinavthapliyal8322
      @abhinavthapliyal8322 3 года назад

      tu kon hota hai be baap banane wala.

    • @News_Shorts-
      @News_Shorts- 3 года назад

      @@abhinavthapliyal8322 hmm.. but even i use it

  • @nortonnnantikill403
    @nortonnnantikill403 5 лет назад +16

    Well explained thank you very much Sir

  • @SumanthLazarus
    @SumanthLazarus 5 лет назад +7

    Thanks mate. What is the difference/purpose between using 'mysql-connector' vs 'sqlalchemy' ?

  • @premstein16
    @premstein16 5 лет назад +29

    Navin, can't find the pip3 installation vdo which you where mentioning.

    • @alcaravan555
      @alcaravan555 4 года назад +2

      I had the same situation, the way I solved was to go where python is located, in my case c:\users\myname\python\pip3 install mysql-connector, I hope this helps

  • @moinafsana5945
    @moinafsana5945 5 лет назад +5

    Those who have facing connection problem need to install two pckg
    1st mysql-connector
    2nd mysql-connector-python
    *** if you are using workbench 8.0 CE

  • @roshnimehta9070
    @roshnimehta9070 3 года назад

    Thanks a lot it helped me .I am trying from so many days I had seen lot of video but never work. But this video clear my problem.

  • @PavanKumar-by8dc
    @PavanKumar-by8dc 4 года назад +1

    Inserting values into tables , after the line mycursor
    insert = ' ' ' INSERT INTO STUDENT VALUES ( 106 , ' PAVAN ' ) ' ' '
    mycursor.execute( insert)

  • @watchout1435
    @watchout1435 4 года назад

    if your cmd cant find pip or pip3 just go to python's official website and download the latest version of python and then try pip on your cmd , worked for me

  • @selcukdoven
    @selcukdoven 5 лет назад +7

    Hi, Firstly I want to thank you for this useful video series. Could you please release the Oracle/Mango database connection and basic queries. A lot of people use these databases. Thank you so much.

  • @marthalanaveen
    @marthalanaveen 5 лет назад +2

    as of november 6, 2019, line 3 from code at 3:39 won't work.
    instead do
    mydb = mysql.connector.connect(user='navin', password='1234',
    host='localhost', auth_plugin='mysql_native_password')
    and that works. you should also have 'mysql-connector-python' and 'mysql-connector' installed.

    • @ashishanjana7403
      @ashishanjana7403 4 года назад

      are mysql-connector-python and mysql-connector both different from each other...?

    • @abhirana8422
      @abhirana8422 4 года назад

      I am having this type of error
      "Authentication plugin '{0}' is not supported".format(plugin_name))
      NotSupportedError: Authentication plugin 'caching_sha2_password' is not supported

  • @julianjohnmert8658
    @julianjohnmert8658 4 года назад +11

    Hey Navin, when I start working and earning a salary I'm donating I promise. I mean I am totally straight but I have never loved another man this much.

  • @maitreyeedey5960
    @maitreyeedey5960 3 года назад +1

    your videos are really helpful to me.. thank you very much

  • @sandeepsinghnegi6348
    @sandeepsinghnegi6348 4 года назад +2

    I recommend people to first uninstall mysql-connector and than install mysql-connector-python as there should clash between both of than while importing library

  • @benjenne8744
    @benjenne8744 5 лет назад +2

    If anybody gets a dumb error try adding use_pure = True:
    mydb = mysql.connector.connect(host="localhost", user = "root", passwd = "password", use_pure = True)

  • @shanuchauhan4814
    @shanuchauhan4814 6 лет назад +1

    Best video on you tube ,Your Explanation is very good
    child can understand your tutorials easily

  • @Family_12362
    @Family_12362 Год назад +1

    Super Explanation Sir👌👉.

  • @공대생코딩하는
    @공대생코딩하는 5 лет назад +15

    hello im korean student i had saw this video so i want to talk you very appreciate.

  • @zakiasmaa6834
    @zakiasmaa6834 4 месяца назад

    want to start by thanking you sincerely for all the effort you've put in-you're truly the best. After following your Python series, I feel confident that I've grasped all the key concepts. However, I'm wondering if you've covered Python scripting and Robot Framework somewhere, as I couldn't find any content on that in your channel. Could you please let me know if you've explained those topics? Thank you!

  • @GLDN06
    @GLDN06 3 года назад +1

    For those students whose output isn't showing properly first install the correct packages properly. Download Pycharm community edition first then got to File then settings. Over there under python interpreter click on the plus icon on top and search mysql-connector-python. Download it and your good to go.!!!

    • @pro_fessor.
      @pro_fessor. Год назад

      And showing, module 'mysql.connector' has no attribute 'connect'
      Any solutions.?

  • @dathashiva
    @dathashiva 3 года назад

    I'm a new user of ubuntu for installation of MySQL taken the whole day. Atlast it worked.

  • @Ibn_Sulaimaan
    @Ibn_Sulaimaan 27 дней назад

    5:47 I got no result when I ran the code after following all the steps. I tried to reinstall the MYSQL server with the SHA password authentication option instead of the legacy authentication. The code now returns the desired output.

  • @avisekdey2224
    @avisekdey2224 6 лет назад +5

    Really nice sir. Content is very good and to the point.

  • @umamaheshkummari7987
    @umamaheshkummari7987 5 лет назад +9

    description box link didn't help to solve pip3 not found error.Please help us.Thanks in advance.

    • @maniksayal2496
      @maniksayal2496 5 лет назад +1

      hey uma I was also getting the same problem.
      To solve it just see the video of setting up the path video from this playlist and then try cmd prompt pip3/3.7(depends upon the version you are using) install MySQL-connector

    • @john16584
      @john16584 5 лет назад +2

      please use this command on cmd ""pip install mysql-connector-python"" this will solve the issue.thanks

  • @PavanKumar-by8dc
    @PavanKumar-by8dc 4 года назад +1

    Thanking You for kind this Stuff and Encouragement...this is really best to everyone.. You are a real master, without skip any , and u thought as everything which is related to Python...

  • @sapl923
    @sapl923 5 лет назад +1

    i am learning and understanding better than my whole month classes thanku sir

  • @misikoala6368
    @misikoala6368 2 года назад

    Wow, you are an angel! Thanks for the teaching.

  • @arindammallick9034
    @arindammallick9034 5 лет назад +4

    please make a video on python with mysql using xampp

  • @GAMINGWITHDESTRYER
    @GAMINGWITHDESTRYER 4 года назад +1

    If you guys getting error like me go to the folder where Python is installed press shift+RMB and click open PowerShell here and write the code below :
    C:\Users\thede\AppData\Local\Programs\Python\Python38> py -m pip install mysql-connector

  • @wasteyourtime02
    @wasteyourtime02 3 года назад

    this guy is the best i wish i had found this channel earlier

  • @Chhiling08
    @Chhiling08 6 лет назад +1

    I always watch your video sir u r very good teacher 😊😊

  • @agbojoraphael7868
    @agbojoraphael7868 6 лет назад +15

    Great job Navin. Your series have been really helpful. I've learnt a lot. I'd appreciate if you can do also on Big data using python. Looking forward to it so much.

  • @Rajadahana
    @Rajadahana 2 года назад

    I don't know anything about MySQL, so I got the message. I need to learn it, first I will finish this playlist and learning MySQL will be my next endeavour.
    A BIG thank you to the whole team behind this effort.

    • @MSAbhi-gj8pn
      @MSAbhi-gj8pn Год назад

      Can you plz share from where you are learning SQL?

  • @dudu_bubu14
    @dudu_bubu14 3 года назад

    Superb sir Thank you so much without your video it is not possible to connect python with mysql

  • @ryan.aquino
    @ryan.aquino 4 года назад

    What is better for production builds? and large scale applications. Do we use ORM like SQLAlchemy? or just a connector. If performance is the metrics

  • @vishutanwar
    @vishutanwar 3 года назад +2

    mysql.connector.errors.InterfaceError: 2003: Can't connect to MySQL server on 'localhost:3306' ( No connection could be made because the target machine actively refused it)
    if you are getting this error maybe you changed port number , don't uninstall that just change back port number

    • @hemantpal1354
      @hemantpal1354 3 года назад

      same error here
      btw wht is port number, How to chnge??

  • @krishnaKumar-zi6ct
    @krishnaKumar-zi6ct 4 года назад

    Clear steps to establish connection and try initial queries. Thanks Navin!

  • @rizaldycesarquimno1058
    @rizaldycesarquimno1058 4 года назад +3

    When I import the mysql.connector it raises ModuleNotFoundError error?

  • @rajibguha6960
    @rajibguha6960 5 лет назад +2

    After install mysql.connector show error into Pycharm such as "ModuleNotFoundError: No module named 'mysql.connector'". Now pl give suggestion, what to do ?

  • @omkartaur3887
    @omkartaur3887 5 лет назад +3

    Your all series videos are awesome and brilliantly explained. Can you also please make tutorial on ' tkinter GUI ' ?

  • @nityasoni7433
    @nityasoni7433 3 года назад +1

    Sir pls explain database connectivity with pycharm also....I m using pycharm from ur starting video

  • @RetroRampageArcade
    @RetroRampageArcade 5 лет назад +10

    mysql module not installed error solution(pycharm)
    file > settings > project > yourproject >project interpreter > click plus button> search for mysql-connector > install

    • @vijayadurga812
      @vijayadurga812 5 лет назад

      Error visual studio ++ something what is the solution for this

    • @nishaagarwal3659
      @nishaagarwal3659 4 года назад

      @badar munir
      error is being occured in my pc even after doing the above thing

  • @infiniteesh
    @infiniteesh 4 года назад +4

    When I try to connect python with mysql in sublime I get an error
    Error : Authentication plugin 'caching_sha2_password' is not supported

    • @aarongeorge579
      @aarongeorge579 4 года назад

      Hi, watch his previous video and follow the steps of installation. I to had this same error and it got fixed by following his way.

    • @feynmansscholar6471
      @feynmansscholar6471 4 года назад

      u must set a path........ "\cd"....... try this b4 install it might work then.

  • @vivekgupta5041
    @vivekgupta5041 3 года назад

    Very useful and helpful video to get started with python and MySQL !!!

  • @mukeshtiwari3131
    @mukeshtiwari3131 5 лет назад +3

    in sublime the message Can't connect to MySQL server on 'localhost:3306' (10061 No connection could be made because the target machine actively refused it) also appears.

  • @BringMe_Back
    @BringMe_Back 2 года назад

    GOD sir ji : i watched both the videos , its much helpful

  • @codingwithparamesh7496
    @codingwithparamesh7496 3 года назад

    The video was very nice. All it compromises of useful informations.

  • @kuruvellameghana2627
    @kuruvellameghana2627 5 лет назад +4

    Sir , I have installed MySQL and had run the code in sublime editor ,but I have got error (MySQL module donot found) but when I run in python shell I got answer.plss ,help me sir

  • @vaishakhkp5612
    @vaishakhkp5612 5 лет назад +1

    This is really helpful, could you please explain about posting data from a html for to the database for user registration and login using python.

  • @amoghranganath4155
    @amoghranganath4155 5 лет назад +1

    Sir, the best guide you are, simple and to the point

    • @amoghranganath4155
      @amoghranganath4155 5 лет назад

      Sir, for Python, we need to do pip3 install mysql-connector-python

    • @PavanKumar-by8dc
      @PavanKumar-by8dc 4 года назад

      @@amoghranganath4155 that is for installation in PyCharm , not for Sublime text

  • @rojertufani131
    @rojertufani131 3 года назад

    Thank you so much sir.. I have run this code in VS code and it is still working

  • @sunkojuanusha2821
    @sunkojuanusha2821 4 года назад +1

    Shall i write this program in pycharm please let me know. I have tried to write in pycharm but getting an error as no module named 'mysql '

  • @Ivan_e9812
    @Ivan_e9812 4 года назад +1

    Thank you so much! Simple and to the point! Worked like a charm!

  • @salihaider6100
    @salihaider6100 5 лет назад +3

    Make a video on beautifulsoup/webscrapping. Please.

  • @rizaldycesarquimno1058
    @rizaldycesarquimno1058 4 года назад +1

    Is the installation of my-sql-connector one time or everytime you have will connect my-sql to python?

    • @pawanggamer6937
      @pawanggamer6937 4 года назад

      one time only
      but you need to import module in python while using mysql

  • @ashishanjana7403
    @ashishanjana7403 4 года назад

    how to use sublime here do i need to install it first? if so, from where please guide me sir...
    thanks a ton for this series...lots of respect for you and your work...

  • @tanishq2766
    @tanishq2766 5 лет назад +1

    Use the command mysql-connector-python rather than using mysql-connector while using the pip install....(if ypu are using the latest version of MySQL its 8.0.7 i guess)
    Regards:- Tanishq:)

    • @vanithas2701
      @vanithas2701 2 года назад

      Den how to import the mysql module in code

    • @tanishq2766
      @tanishq2766 2 года назад

      @@vanithas2701 import myql-connector

  • @abinashlenka9455
    @abinashlenka9455 4 года назад +1

    Actually am getting a module not found error while running the python code on command prompt , so can u plz let me know y bcz i have already installed the connector but still i am unable to run d Python code

  • @Indu_Ravi10
    @Indu_Ravi10 2 года назад

    Thank you so much sir ,It was helped me a lot. ✨☺️Keep going.

  • @yigitgenc1734
    @yigitgenc1734 4 года назад

    while putting in the "host" variable you put localhost there but if you were hosting this database on a website what were you supposed to put? The websites link or the ip address of that website?

  • @PITCLLCUSA
    @PITCLLCUSA 2 года назад

    Awesome and very easy to connect, only I struggle while installing mysql connector

  • @chaitanyakrishna9398
    @chaitanyakrishna9398 4 года назад

    sir, I am a complete beginner in python. I am learning python from it's word meaning, from you. But this video creating a fear that I need some programming background to watch upcoming playlist videos. Is it true sir. If yes please help me .....sir

  • @vishalkanojiya2877
    @vishalkanojiya2877 5 лет назад

    didnt found link for that pip is not working. as you mention in video at 1:11

  • @prabhakarvadakattu534
    @prabhakarvadakattu534 3 года назад

    Which software are you using to record
    the videoo to get the dask top screen and your self at the same time. Please reply sir

  • @veerabrahmampydimarri2742
    @veerabrahmampydimarri2742 4 года назад +2

    sir, I have watched ur video, and got stuck with error, help me solving this
    "Authentication plugin '{0}' is not supported".format(plugin_name))
    mysql.connector.errors.NotSupportedError: Authentication plugin 'caching_sha2_password' is not supported

    • @balrajei
      @balrajei 4 года назад +1

      try installing pip3 install mysql-connector-python

    • @taruntalwar5422
      @taruntalwar5422 4 года назад

      @@balrajei Thanks

    • @ankitkochhar7421
      @ankitkochhar7421 4 года назад +1

      Download mysql-connector-python
      I was getting the same error and resolve it by downloading the above connector

  • @1112sravani
    @1112sravani 6 лет назад +2

    It would be really useful...Recently i have done some project for which I needed a video like this very badly.. I've had to watch so many videos to complete it..Nobody is as good as u

  • @worldofai6406
    @worldofai6406 5 лет назад +2

    can we use Xampp myphpadmin instead of MySQL workstation?

  • @auchityaprakashsinha
    @auchityaprakashsinha 3 года назад

    Hello, I have made a face recognition model using open CV. I am accessing the trained data from my computer itself (local server). Now I wanted to extract my data from Cloud insted of local server. What should be my approach and how should I modify my code.
    Please guide me with this.

  • @zakinaqvi998
    @zakinaqvi998 2 года назад

    Thanks for uploading such an informative video

  • @pavantanniru
    @pavantanniru 4 года назад

    txns a lot finally i got it and i subscribed tooo😎😎😎😎

  • @alaydyngholechragh5678
    @alaydyngholechragh5678 6 лет назад

    hello
    one question
    which database i should use for python for create web application??
    a database with best speed an performance !!
    i use windows 10 .. and IDE Visual studio Code
    i want a database for python Which is not necessary to change it later to another database

  • @kamleshzanjad263
    @kamleshzanjad263 Год назад

    Great learning... It was great learning experience.

  • @jsj14
    @jsj14 4 года назад

    How do I send the output parameter for a stored procedure from python? It keeps breaking saying I sent more args if I send an additional 0 or '@out' and if I don't send it, it asks for it.

  • @vandanaarya1465
    @vandanaarya1465 2 года назад

    Great video and platform to learn quick and easily.

  • @ayushsinhapropsyatra2023
    @ayushsinhapropsyatra2023 7 дней назад

    Your pythoooon series is epic😊

  • @aashankkalia4464
    @aashankkalia4464 2 года назад

    Very informative. Thank You!

  • @arpitkumar-fs1rx
    @arpitkumar-fs1rx 16 дней назад

    Thank You this helped in my IP project

  • @namanb12
    @namanb12 5 лет назад

    Solution to Access Denied Error
    Run the same command which he ran initially but run cmd as an administrator. This can be done by right clicking on cmd and selecting run as administrator. This worked for me hope it does for all.

  • @sassyjas1313
    @sassyjas1313 5 лет назад +8

    no video for pip3 error. please help!!
    Thank YOu

    • @rahulkumarc341
      @rahulkumarc341 5 лет назад

      Did u got solution ? is pip3 working? if so please help me.

    • @vikasms9113
      @vikasms9113 5 лет назад

      set the path thats it

  • @lakshit6429
    @lakshit6429 4 года назад

    thankyou very very very muchhh sir i was too much confused with this concept

  • @satkarshsharma915
    @satkarshsharma915 2 года назад

    Navin Sir, It is wrong library wrong used in the video that is pip install mysql-connector.
    The correct library is pip3 install mysql-connector-python to connect mysql with python and pycharm.

  • @ayushrajput6284
    @ayushrajput6284 4 года назад +1

    Sublime text 3 is love ❤️❤️
    I do all coding whether it be C, python, css etc all in one app... ✌️

  • @hafizabdulrehmaniqbal3968
    @hafizabdulrehmaniqbal3968 5 лет назад +6

    Help to fix pip3 install
    Its giving syntax error

  • @santhoshiindrakanti4288
    @santhoshiindrakanti4288 4 года назад +1

    I am getting " Python was not found but can be installed from the Microsoft store:" at the output of Sublime Text....can anyone please help me..

  • @vaibhavsharma399
    @vaibhavsharma399 4 года назад

    so will the procedure be same in case of connecting with a live database server?

  • @Rocky-me7qh
    @Rocky-me7qh 6 лет назад +3

    You are great sir

  • @himanshuchoudhary8222
    @himanshuchoudhary8222 5 лет назад +1

    I'm very glad to see your video...and keep giving such kind of knowledge full of our study.......stay happy and blessed

  • @ajitk558
    @ajitk558 4 года назад

    *I AM GETTING THE ERROR WHICH IS SPECIFIED IN THE TIMING **3:50** EVEN AFTER INSTALLING THE PYTHON CONNECTOR. WHAT IS THE PROBLEM ?PLEASE HELP ME AS SOON AS POSSIBLE PLEASE ITS URGENT.*

  • @vijaybhaskar689
    @vijaybhaskar689 3 года назад

    This is great. I hope you the similar process for IBM DB2. If you have that video can you
    Please share 😊

  • @saikrishna.b736
    @saikrishna.b736 3 года назад

    Bro one question which is most used and has future ... Python + MySQL or Python + MongoDB
    Or which combination gives good demand while shifting to another company

    • @techfierce7561
      @techfierce7561 3 года назад +1

      It totally depends on the scenario. If you are building an application for buisness use whose database can be structured in rows and columns then go for SQL databases like MySQL, POSTGRESQL etc. But where as if you are building an application whose databse has complex tree like structure like social media apps whose comments section is hard to build with SQL databases we come up with NoSQL databases such as MongoDb.

  • @yojithaaluru9372
    @yojithaaluru9372 Год назад

    I didn't find the pip connection error video in description box. Can u let me know where it is exactly?

  • @amanhaldar461
    @amanhaldar461 3 года назад

    sir thanku
    very very much😍😘😘😘😘😘😘

  • @ishugoyal5781
    @ishugoyal5781 4 года назад +3

    i have installed the connector still in pycharm its showing no package with tha name

    • @yashasvibhatt1951
      @yashasvibhatt1951 4 года назад +1

      type this *"python -m pip install mysql-connector-python"* if you still have problem

    • @shricharanb7914
      @shricharanb7914 4 года назад

      I too get that 🥺
      Please help !