Тёмный
No video :(

Python MySQL Tutorial - Setup & Basic Queries (w/ MySQL Connector) 

Tech With Tim
Подписаться 1,6 млн
Просмотров 388 тыс.
50% 1

Learn how to use MySQL and SQL with python. In this series I will show you how to use the python mysql connector to create tables, insert data and work with a MySQL database.
MySQL is a relational database management system. It is a great tool to learn how to use and will allow you to demonstrate your experience with RDBMS to future employers. (Employers usually require you know SQL!!)
Links:
MySQL: dev.mysql.com/...
Python Connector: dev.mysql.com/...
Playlist: • Python MySQL Tutorial ...
◾◾◾◾◾
💻 Enroll in The Fundamentals of Programming w/ Python
tech-with-tim.....
📸 Instagram: / tech_with_tim
🌎 Website techwithtim.net
📱 Twitter: / techwithtimm
⭐ Discord: / discord
📝 LinkedIn: / tim-rusci. .
📂 GitHub: github.com/tec...
🔊 Podcast: anchor.fm/tech...
💵 One-Time Donations: www.paypal.com....
💰 Patreon: / techwithtim
◾◾◾◾◾◾
⚡ Please leave a LIKE and SUBSCRIBE for more content! ⚡
Tags:
- Tech With Tim
- Python Tutorials
- Python MySQL
- MySQL Tutorial Python
#Python #MySQL #SQL

Опубликовано:

 

15 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 234   
@TechWithTim
@TechWithTim 4 года назад
Let me know what you want from this series!
@Pa-ow1nj
@Pa-ow1nj 4 года назад
That was helpful thanks, I got an arduino working with an temperature sensor who is able to send the data to a mysql database realy looking forward for this season :) !!
@floydian25
@floydian25 4 года назад
Some complex queries as well that are asked in interviews
@Krishna42570
@Krishna42570 4 года назад
Plss solvee leetcode problemsss and hackerrankkk problemsss
@bensmith9253
@bensmith9253 4 года назад
This is great. Looking forward to the next one. 👍
@maciejmyslinski7820
@maciejmyslinski7820 4 года назад
Import data from files e.g. csv etc.
@desislavaandreeva4359
@desislavaandreeva4359 4 года назад
I use MySQL in my daily work and combining with python as extra knowledge outside of the office will definitely help me jumping in a better job! Thank you Tim, you are a wizard!
@bigfatcrab
@bigfatcrab 4 года назад
wrong, he has a fairies. Timmy Turner has a fairy oddparents
@virgil6892
@virgil6892 4 года назад
In case you get an error along the lines of: "line 191, in get_auth_plugin "Authentication plugin '{0}' is not supported".format(plugin_name)) mysql.connector.errors.NotSupportedError: Authentication plugin 'caching_sha2_password' is not supported" it's because you don't have the right version of the python connector. you can get the right version with the following command *pip install MySQL-connector-python*
@shouyuanchen3741
@shouyuanchen3741 4 года назад
I wan to add one more point, if u just do "pip install mysql-connector-python" doesnt work, first uninstall mysql-connector and uninstall mysql-connector-python via "pip uninstall mysql-connector " and via"pip uninstall mysql-connector-python" and then install mysql-connector-python. have fun gl
@kbsim2004
@kbsim2004 4 года назад
thanks a lot this really help, i ma been struggle of this prob
@JorgeMirandaRN
@JorgeMirandaRN 4 года назад
​@@shouyuanchen3741 thanks a lot (y) it was so helpful
@FrankJordanBeatbox
@FrankJordanBeatbox 4 года назад
I love you
@j.r.7693
@j.r.7693 4 года назад
Thank you
@alexandermread
@alexandermread 4 года назад
Hey I got the error 'mysql.connector.errors.NotSupportedError: Authentication plugin 'caching_sha2_password' is not supported' and it was because I installed 'mysql-connector' using pip instead of 'mysql-connector-python'. Just letting anybody know in case someone made the same mistake
@lukewismer3352
@lukewismer3352 3 года назад
Thank you!!!!
@aaronjauregui170
@aaronjauregui170 3 года назад
Omg your a lifesaver thank you!!
@nagatoshi4597
@nagatoshi4597 3 года назад
Thanks!
@celebibalkanl6642
@celebibalkanl6642 10 месяцев назад
you are awesome
@harshmultani2996
@harshmultani2996 8 месяцев назад
Thanks
@elliamorse1442
@elliamorse1442 4 года назад
This was a lovely introduction to your channel and I'm looking forward to watching more of your videos and completing this series on MySQL and Python!
@trevordontstalkme1303
@trevordontstalkme1303 2 года назад
This is a fucking gold mine, this guy explains shit with just enough depth to invoke thought but simple enough to retain. Thank you!
@shashwatm4332
@shashwatm4332 3 года назад
I HAVE SEARCHED FOR THOUSANDS OF VIDEOS...AND I DIDNT UNDERSTAND....YOURS HELPED ME A LOT....THANKS TIM!
@Shadowex2000
@Shadowex2000 3 года назад
For anyone having the error: "mysql.connector.errors.NotSupportedError: Authentication plugin 'caching_sha2_password' is not supported" Instead of running: pip install mysql-connector Run: pip install mysql-connnector-python
@jordanhowell8041
@jordanhowell8041 2 года назад
when you install it use pip install mysql-connector-python (instead of pip install mysql-connector)
@klasta2167
@klasta2167 2 года назад
After installing mysql-connector-python, how should I import it?
@Cordic45
@Cordic45 2 года назад
@@klasta2167 Same as video
@merrymouse2008
@merrymouse2008 Год назад
For all those who is still getting "ModuleNotFoundError" and tried everything, this command is what worked for me: python3 -m pip install mysql-connector I'm on Windows 10, Using Python 3.9. When I tried manually install the connector as Tim suggested, OS complained saying I had to run it as admin which I already did (no idea wtf is happened there). I hope this will save time to someone.
@InfinityBS
@InfinityBS 6 месяцев назад
ur literally a life saver, i couldnt find the connector download for windows anywhere on the website, i tried this command and it worked. thank you
@vudhanthineeraja1904
@vudhanthineeraja1904 Год назад
This series really helped me out! Got to submit my project tomorrow (i.e. today it is currently 1:30 am where I'm rn lol), thanks to you Tim, I can sleep now! I just can't thank you enough! Also after seeing this video I've made up my mind to take up the machine learning course you teach on FreeCodeCamp. Once again thank you so much!
@stephendiehl5529
@stephendiehl5529 3 года назад
Just a heads up if you are using a newer version of Python. When installing via pip you need to enter pip install mysql-connector-python as the way to install in this video is outdated! Finally figured it out after a good 30 minutes of searching so hopefully if you are having an issue this helps!
@LilGam3r1
@LilGam3r1 2 года назад
same here lol
@adri4351
@adri4351 4 года назад
This is really need! Thanks Tim! You are doing an awesome job! I think that explaining how SQL works in more depth, how to code in SQL, how to handle data (retrieve it from the server and send it to the server) using python...Those would be good ideas. Also, could you go more deep explaining how the local servers work and how can we create an online server? Thanks again man!!!
@datofficial6062
@datofficial6062 Год назад
this was exactly what i was looking for and it was the first video i clicked on Tim the Top GUY EVERYTIME
@kasyapdharanikota8570
@kasyapdharanikota8570 3 года назад
thank you ; installed the whole setup without any problems after following your instructions
@ImGeneralJAckson
@ImGeneralJAckson 8 месяцев назад
you are explaining this much more clearly and concisely than my grad professor. Thank you!
@BurmeseBlueRose
@BurmeseBlueRose 3 года назад
Лучшее видео про установку mySQL! Спасибо! The best video about installing mySQL! Thanks!
@erack1
@erack1 3 года назад
Awesome, awesome, awesome. Tim. I recently got into Python3 in the last month, and I'm in love. Your series on Selenium has help tons for my web automation program i'm trying to create. I'm looking forward to incorporating the MySQL database to this program for data management. Love your videos! Much love, Nick
@foxglvz6237
@foxglvz6237 4 года назад
Damn looks like a awesome series is going on here! Greetings from FR thanks a lot, you rock man!! ♥
@shreejanshrestha1931
@shreejanshrestha1931 4 года назад
2020: mysql-connector will not work its deprecated, instead install mysql-connector-python. if you have installed mysql-connector previously, do pip uninstall mysql-connector and then install one with -python at last.
@joelwoodward3663
@joelwoodward3663 3 года назад
this still isnt working
@suryayadav2520
@suryayadav2520 4 года назад
How can actually connect a front end tech with mysql db
@thisisscotts
@thisisscotts 2 года назад
If you get the error "AttributeError: module 'mysql' has no attribute 'connector'" even after reinstalling the connector, as Tim suggested, try modifying your python script to "import mysql.connector". At least, that worked for me (using Python 3.10, MySQL/MariaDB 10.5.15, Win 10, Atom 1.60 text editor)
@metalflames777
@metalflames777 6 месяцев назад
Thank you!! Gave me exactly what I needed to get my first connection and test done!
@DuniaDY
@DuniaDY 4 года назад
Excellent stuff, high quality content in your videos! Thanks for putting in all the good work, Tim.
@user-se6jv5lw2o
@user-se6jv5lw2o Год назад
Am getting an error Saying Authentic plugging 'caching_sha_passwords' is not supported
@chriswaller8780
@chriswaller8780 2 года назад
YO shoutout for correctly calling it a hyphen and not a dash. Thank you.
@jidhinjustin214
@jidhinjustin214 3 года назад
I am getting this error mysql.connector.errors.DatabaseError: 2003 (HY000): Can't connect to MySQL server on 'localhost' (61)
@user-lm8ig7os2k
@user-lm8ig7os2k 3 года назад
brother I'm getting this error in pycharm ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it ; could You help me here?
@B1SQ1T
@B1SQ1T Год назад
For those who did pip install mysql-connector and still can't get import mysql.connector to work, try doing pip install mysql-connector-python I'm on python 3.10.6 so I'm not too sure if there was some update between this video coming out and now but that did it for me
@erikdingeldein3359
@erikdingeldein3359 Год назад
If this still doesn't work for you try: pip uninstall mysql-connector pip uninstall mysql-connector-python then: pip install mysql-connector just installing on top of the other package didn't work for me
@JollyBeJolly
@JollyBeJolly 4 года назад
Thank you Tim. Watched countless other tutorials and they are making download this and that and making re download this and that.
@cameron8394
@cameron8394 Год назад
Only guide that i managed to get it connected, developer option seems to not be there anymore so i just installed full and its working okay for me
@davidarnoldio3420
@davidarnoldio3420 6 месяцев назад
hi tim but mine doesn't have the developer default option what should i choose then?
@jaimecrawford
@jaimecrawford 4 года назад
Thanks! This got me going with the mysql connector for python after a few failed attempts.
@danedmdan
@danedmdan 2 года назад
Thank you Tim, great video, clear and easy to follow. Very pleasant! I know this is a while after you posted this video, but by chance have you also come upon Python in your past job searches or interviews? Do they ask computer science type coding questions by chance related to data structures, algorithms, time complexity of programs, etc either in a tex editor or onto a white board? I have to learn similar technologies but for working in biology, I was told I would have to give a presentation. (maybe of code or other projects) Thank you!
@guidolandinidrums
@guidolandinidrums 2 года назад
Anyone with this problem? -> Access denied for user 'root'@'localhost' (using password: YES)
@star-sl8wv
@star-sl8wv Год назад
Yes help anyone??
@cancan740
@cancan740 2 года назад
i like the way that you explain in very clear , thanks
@payman_azari
@payman_azari Год назад
I would suggest first find an overview on MySQL and write some basic queries on its workbench and then watching this series is recommended for not to get lost. ⚠ good videos buy the way.
@edwardedward7765
@edwardedward7765 2 года назад
What you have explained is good and also easy to undertsand.
@kaizen8492
@kaizen8492 Год назад
If you run into the same problem I did. Python3.10 wouldn't connect and manually I couldnt connect SQL so I had to go into the terminal and run "python3.10 -m pip install mysql-connector-python" that allowed me to get everthing working since even as an ADMIN I wasnt able to install the connector.
@sabrysm
@sabrysm Год назад
Thanks
@suyashvashishtha4904
@suyashvashishtha4904 4 года назад
so basically if some one is having DNS Resolver problem just do this ;- ok to resolve this First install dns for python by cmd using 'pip install dnspython' (if you use conda first type 'activate' and then you will go in base (in cmd) and then type above code) it will install it in anaconda site package ,copy the location of that site package folder from cmd, and open it . Now copy all dns folders ( 2 folders ) and paste them in python site package folder. it will resolve it . actually the thing is our code is not able to find the specified package in python\site package bcz it is in anaconda\site package. so you have to COPY IT (not cut)
@suyashvashishtha4904
@suyashvashishtha4904 4 года назад
this will actually work and will fix all of your problem !!
@godboy114
@godboy114 2 года назад
pip install mysql-connector-python if you get the "mysql.connector.errors.NotSupportedError: Authentication plugin 'caching_sha2_password' is not supported" error.
@dunzek943
@dunzek943 4 года назад
mysql.connector.errors.ProgrammingError: 1045 (28000): Access denied for user ''@'localhost' (using password: YES) Error occurs when you changed your MySQL's port number (default is 3306). To anyone who changed their port number during the MySQL installation, just pass in port="", in db = mysql.connector.connect() alongside host="", user="", etc.
@sexystranger6730
@sexystranger6730 3 года назад
thank you
@danishkh4489
@danishkh4489 2 года назад
Showing Error Even Tho I didn't change the port..
@star-sl8wv
@star-sl8wv Год назад
@@danishkh4489 same
@swamicoupet4355
@swamicoupet4355 2 года назад
this was actually very helpful, thank you very much
@Kephers7
@Kephers7 3 года назад
So, question. What are you using to write this code in? Its not the workbench. Is this a standard text editor or what are you using? How would you run it to see if you get errors?
@hamadler2898
@hamadler2898 4 года назад
friend, why i can't connect my MySQL to my python program on (KALI LINUX) is that even possible to connect MySQL to python on KALI LINUX? because i couldn't find any tutorial videos about that problem
@user-ev7vh5cm1v
@user-ev7vh5cm1v 2 года назад
Thanks a lot! you did it very simple and very clear, it was helpfull!
@tishyaghosh6977
@tishyaghosh6977 4 года назад
Traceback (most recent call last): File "", line 1, in import mysql.connector ModuleNotFoundError: No module named 'mysql' this is comming plz anyone help i have installed the .dmg file many times still the problrm remains.:-(
@louisbloom5505
@louisbloom5505 3 года назад
pip install mysql
@tutnamtt
@tutnamtt 2 года назад
I'm having the same error as well. Did you have any luck here?
@andresrojano6805
@andresrojano6805 2 года назад
This is a really good tutorial, thanks for making it
@brene339
@brene339 Год назад
This was helpful - thank you!
@jasonclough8892
@jasonclough8892 4 года назад
I can't find my server in the MySQL Workbench?...
@klamyamkun5339
@klamyamkun5339 4 месяца назад
Hey Tim, @TechWithTim I didn’t find developer default option under the setup type 2:42 , what can I do? Thanks
@BlazinEdit
@BlazinEdit 4 года назад
So hyped for this series! I was recently searching on how to work with DB, hopefully I can follow you. Is there some GUI interface that can display all the relation between tables in our database?
@caelim3524
@caelim3524 4 года назад
Pretty much any python GUI module should work
@soldadopreciso
@soldadopreciso 3 года назад
Thanks pal, very useful video tutorial, go ahead.
@nurulilyani1355
@nurulilyani1355 5 месяцев назад
Hi Tim..why I have only MySQL Server in the list of configuration?
@janjeromesoriano1182
@janjeromesoriano1182 2 года назад
easy to follow. very helpful
@eugenetomashy8820
@eugenetomashy8820 2 года назад
Authentication plugin 'caching_sha2_password' is not supported I have this issue. What does it mean ? :/
@filipphigari1674
@filipphigari1674 2 года назад
pip uninstall mysql-connector... then pip install mysql-connector-python .. I googled it on stack overflow. Had same problem. Works now.
@christophermartinez1769
@christophermartinez1769 2 года назад
Would be nice a video just explaining the connection in python. good video
@vagifk2864
@vagifk2864 4 года назад
Hello Tim, have you ever tried to work with Amazon Aurora, does it work similarly to MySQL?
@kushaal1607
@kushaal1607 3 года назад
It is showing AttributeError : module 'mysql.connector' has no attribute 'connect' What should I do now..? Anybody pls help😥😥
@oilamuchun2744
@oilamuchun2744 2 года назад
a lot thank you
@calvinball1
@calvinball1 2 года назад
Great stuff, thanks!
@hanskalaran3337
@hanskalaran3337 3 года назад
Thanks, it was helpful for me. : )
@JohnCarrFitness
@JohnCarrFitness 2 года назад
It would be heloful iuf you linked the next video at the end of this one.
@HakendaNatan
@HakendaNatan 3 года назад
That was great. Thank you.
@usama57926
@usama57926 4 года назад
can we use xampp here???
@lulcy95
@lulcy95 4 месяца назад
Will any of these work if I use Visual Studio Code instead?
@pablogonzalez3705
@pablogonzalez3705 4 года назад
Hey bro, i am a first year Computer Science student too, which college are u in?
@Allen-by6ci
@Allen-by6ci 3 года назад
Excellent video
@itsbuttersthecanine2477
@itsbuttersthecanine2477 2 года назад
Did anyone get this message. C:\Users\Butters>activate 'activate' is not recognized as an internal or external command, operable program or batch file.
@SkyFly19853
@SkyFly19853 4 года назад
Getting better and better... I am also learning about mySQL... So, mySQL and Python... a nice combination...
@kamilkayout
@kamilkayout 2 года назад
what if I wanna connect to a database not on my computer what should I put in "host"?
@eitan367
@eitan367 2 года назад
Would be the address and port where the database is located. It could be on the domain, check your host.
@m0rphene3
@m0rphene3 4 года назад
I can import mysql in python but unable to import mysql connector.its showing no module named mysql.connector ; mysql is not a package.help me I've successfully installed mysql connector but still.
@joelwoodward3663
@joelwoodward3663 3 года назад
did you get an answer on this one? im having the same issue
@shreyasreedhar2068
@shreyasreedhar2068 4 года назад
very helpful! thanks so much :)
@artaalipour
@artaalipour Год назад
Thanks man
@josephsimpson2903
@josephsimpson2903 2 года назад
I used pip install mysql-connector-python / when I try to run it in visual studio code, it doesn't work. It says it's uploaded but still not luck... Any answers???
@randy4443
@randy4443 4 года назад
If I am making the database withinin python. For example. I make a dictionary of students and their grades, how would I insert this into mysql? Would I need to manually student in my sql?
@keshan-spec
@keshan-spec 4 года назад
why does this look so complicated? i mean cant we use phomyadmin's mysql server? or do we specifically need to install the mysql server like you did? any thoughts? great video btw.
@jdgh86
@jdgh86 3 года назад
Great video thanks! :)
@chetanabansal9298
@chetanabansal9298 Год назад
after following your stated steps i am getting an error saying 'no mysql module'. can u please help me out i need it urgently
@Kig_Ama
@Kig_Ama 3 года назад
12:17 As I see u r not using pycharm. I am using pycharm. The problem I have is the sql queries used with the mysql connector don't have any color highlighting and language injection. How can I solve the problem?
@m.shiqofilla4246
@m.shiqofilla4246 2 года назад
Bro in 2:57 there are many products to install, but when i try that it only appear 4, all of them are connector, no workbench, no MySql server, no MySql Shell, router, etc, is that because i use 32 bit system computer? Can MySQL work completely (with all the products) in 32 bit (x86) system? Please answer it friends...
@videoventures6571
@videoventures6571 Год назад
I deleted the MySQL server 8.017 and then installed the package again but it did not have the server again. What solution can u give me? cause when I installed the Mysql server community edition but it does not have the package as I previously deleted it.
@erich.3247
@erich.3247 4 года назад
Great Video!
@inmathswetrust5293
@inmathswetrust5293 2 года назад
thank you Tim
@tagoreji2143
@tagoreji2143 4 года назад
thanks a lot sir when i completed my installation process i got a message that this is not meant for your OS ,So do I get any problems in the future
@rizwansayyed5043
@rizwansayyed5043 4 года назад
Please help me with this question. I am having a mysql database in my VPS which has 100k max_connection. And i am having around 90k users per second in my app, so can anyone please suggest me what should i do. Should i switch from mysql to Hadoop, Cassandra or other big database, or should i keep using mysql. I have searched but didn't get a good answer that i can rely on. Please help me i am having problems and less time. Please help me.
@joelv4982
@joelv4982 Год назад
Can't connect to MySQL server on 'localhost:3306' (13 An attempt was made to access a socket in a way forbidden by its access permissions): Help..
@sumitdubey6478
@sumitdubey6478 2 года назад
when i typed python it opened windows store. what should i do. i have already installed python from its official website
@petermuwanguzi3787
@petermuwanguzi3787 4 года назад
i liked it thou i prefer postgres to mysql so can you please do a video on python and postgres
@nishantpiyush7963
@nishantpiyush7963 Год назад
hello sir, currently i am trying to execute some mysql query using python but i am facing some issues please help
@vaibhavgawde11
@vaibhavgawde11 3 года назад
thank you so much man
@MarceloLopesdeAmorimJunior
@MarceloLopesdeAmorimJunior Год назад
Thank you!
@ayushpurohit8266
@ayushpurohit8266 Год назад
Is the connector installed by the mysql installer different from one installed by command prompt?
@technology-myanmar1096
@technology-myanmar1096 2 года назад
hey can you help me how can I host that database
@MrJaredGTR
@MrJaredGTR 4 года назад
Thanks so much!
@hanyiwang1316
@hanyiwang1316 4 года назад
i would like to learn how to create a database to track each client's info with pictures and have a SMS sending program connected to this database. Thank you!
@bensonyeo1087
@bensonyeo1087 Год назад
Can use mysql workbench as server ? Please help me. Thank you
@CaribouDataScience
@CaribouDataScience 2 года назад
What playlist is the this part of?
@wspacemailbox2160
@wspacemailbox2160 3 года назад
Nice but how do you encrypt your credentials on the local file?
@zguiizy
@zguiizy 2 года назад
thanks!
@imcnx1563
@imcnx1563 3 года назад
what about if I want to use an online database like PHP MyAdmin?
Далее
Please Master These 10 Python Functions…
22:17
Просмотров 127 тыс.
SQL Databases with Pandas and Python - A Complete Guide
16:59
Python 101: Learn the 5 Must-Know Concepts
20:00
Просмотров 1,1 млн
MySQL - The Basics // Learn SQL in 23 Easy Steps
17:17
Просмотров 833 тыс.
What does a Data Analyst actually do? (in 2024) Q&A
14:27