Тёмный
No video :(

Python - Connect to MySQL Database with PyCharm 

WittCode
Подписаться 14 тыс.
Просмотров 110 тыс.
50% 1

In this video we will be connecting to a MySQL database with Python. Specifically, we will be using the PyCharm IDE to work with Python and MySQL Workbench to work with MySQL. We will also learn about Python MySQL Connectors and how Python connects to a database.
How to install PyCharm:
• Install PyCharm & Pyth...
How to install MySQL and MySQL Workbench:
• How to install MySQL 8...
Link to learn MySQL Connector connect() function:
dev.mysql.com/...
💻 My Software 💻
My Chrome Extension WittCepter - chromewebstore...
📚 My Courses 📚
courses.wittco...
👩‍💻 Download Code 👨‍💻
blog.wittcode.com

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

 

27 апр 2021

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 152   
@user-wj5fq2in2y
@user-wj5fq2in2y 2 года назад
Потратил весь день и не нашел нормального объяснения. Но твое видео - топ, сразу все понятно и работает! Спасибо
@lechallday2999
@lechallday2999 2 года назад
After hours of searching i've come across the perfect video on how to install a mysql connector in python. I had no clue that finding an explanation for this would be so hard to find. Thank you so much sir
@mohdsameer9214
@mohdsameer9214 Год назад
I was going through that situation.
@munyaivhuthuhawe8829
@munyaivhuthuhawe8829 3 года назад
Man I'd just like to thank you. I've been searching and searching for the past 3 days for this and this content hear just saved my life and my project. You are awesome ✅😁😁
@WittCode
@WittCode 3 года назад
Hey Munyai! That's great to hear! Glad I could help! 😀
@KiranSachi
@KiranSachi 2 года назад
6
@balajinaveen9090
@balajinaveen9090 Год назад
@@WittCode you say correct bro👍
@user-px9xo5qq5i
@user-px9xo5qq5i 5 месяцев назад
Mistrzu. Wielkie dzięki. Przeczytałem komentarze i tam jest już wszystko napisane co sam chciałbym napisać. Pozdrawiam, trzymaj się jesteś w porządku.
@salvador8164
@salvador8164 Год назад
why this man only have 5.82k subscriber man he should have millions thank you man keep on helping thank you very much
@meghanam7550
@meghanam7550 3 года назад
I was searching from 1 week for this video. This video saved me. A big thanks to this man. I watched more than 15 video from past 1 week but it was not explained in this way.
@WittCode
@WittCode 3 года назад
Awesome to hear Meghana! Thanks for the kind words! 😁
@ochiengwilliam
@ochiengwilliam 3 года назад
I have no doubt subscribing to your channel and liking your video. Thank you very much
@WittCode
@WittCode 3 года назад
That's great to hear! Thanks K'Ochieng! 😀
@joannwatu7603
@joannwatu7603 2 года назад
Thank you. This was very helpful
@WittCode
@WittCode 2 года назад
Thanks so much for watching Joan! 😀
@mdfaheemuddin2031
@mdfaheemuddin2031 3 года назад
That was very, very, very, very...... helpful
@WittCode
@WittCode 3 года назад
Great to hear! Thanks for watching! 🤠
@yasith6370
@yasith6370 2 года назад
I nearly think to quit programming by a small problem but you video helped a lot😘
@georgeimus6102
@georgeimus6102 7 месяцев назад
You just saved me your the greatest
@h.d.4644
@h.d.4644 2 года назад
Thank you so much. Ive been looking for a solution on StackOverflow for hours and this is the first approach that immediately worked.
@yasith6370
@yasith6370 2 года назад
Love you man
@GentianLloshi
@GentianLloshi 2 года назад
Thanks for this useful video! It helped me a lot. Keep up the good work!
@TacticalSommelier
@TacticalSommelier 3 года назад
Thank you! Great walkthrough. Much appreciated bro
@WittCode
@WittCode 3 года назад
Of course! Thank you for watching! 🤠
@tokelo2547
@tokelo2547 Год назад
Yo...Great video. I have been tirelessly searching for a video like yours. Thank you very much. Next one may you please make us one for a streamlit web app using both locally hosted and on cloud both on MySQL databases! Thank you!!
@mambacreatives
@mambacreatives 5 месяцев назад
Amazing tutorial
@WittCode
@WittCode 10 дней назад
😀
@caratzu2556
@caratzu2556 2 месяца назад
Thank you so much for this amazing video I have been searching all over the internet and finally found this video 🍀
@WittCode
@WittCode 10 дней назад
😀
@Shephard_
@Shephard_ 3 года назад
Thanks for this video really helped with my project.
@WittCode
@WittCode 3 года назад
That's great to hear! Thanks for watching! 😁
@KashyapSharma0
@KashyapSharma0 Год назад
Simple and concise.. Thank you so much!!
@sanketkadam9600
@sanketkadam9600 2 года назад
thank you man. it makes me real easy to connect with mysql.
@umitech287
@umitech287 3 года назад
Very helpful 👍
@WittCode
@WittCode 3 года назад
Thanks so much Umair!
@code6233
@code6233 3 года назад
Thank you very much ❤️
@WittCode
@WittCode 3 года назад
Anytime! Thanks for watching! 😃
@pranayr1718
@pranayr1718 2 года назад
Good Work!!! Thank You
@stevekituku8783
@stevekituku8783 9 месяцев назад
This video is beyond GREAT!!
@omthorve7928
@omthorve7928 Год назад
Bro the video you gave in description for mysql download thanks for that it was really helpful
@sudhirdheple4752
@sudhirdheple4752 2 года назад
Thank you sir 🙏
@sandeeptadikamalla2721
@sandeeptadikamalla2721 2 года назад
Thank u for wonderful explanation !
@WittCode
@WittCode 2 года назад
Of course Sandeep! Thanks for watching! 😀
@loucok
@loucok Год назад
best solution I found Thank you bro!
@mctaggart3
@mctaggart3 2 года назад
Thanks a lot, really helpful!
@dillondonovan9074
@dillondonovan9074 3 года назад
Hey WittCode, i have a question? I assume you are professional and im curious where you work / what you do.
@WittCode
@WittCode 3 года назад
Hey Dillon good to hear from you again! I am a full stack developer in javascript but I have only recently started. I actually did chemistry in college and I taught myself this stuff!
@jampulaharshavardhan7577
@jampulaharshavardhan7577 Год назад
Thank you so much. i subscribed your channel now.
@johannesallgaier5722
@johannesallgaier5722 2 года назад
Great work, thanks for sharing your knowledge!
@pratapreddy9820
@pratapreddy9820 Год назад
Where can I find the connect function under mysql module ?
@tsruturaj
@tsruturaj Год назад
Thank you so much it helped me a lot , saved my time !
@FarmBoyTech
@FarmBoyTech 8 месяцев назад
Hey man big thanks to you
@abdullahfahad6388
@abdullahfahad6388 8 месяцев назад
Will it work for pycharm community version?
@amelhadfi388
@amelhadfi388 3 года назад
Do you have a video on how to load MySQL data to Hadoop? I have officially connected MySQL using this video (thanks by the way, helped a lot).
@WittCode
@WittCode 3 года назад
Hey Amel! Thanks for watching! Sadly I do not as I am not too familiar with Hadoop. 😄
@akashsonar7161
@akashsonar7161 3 года назад
Appreciated your efforts brother thank you
@WittCode
@WittCode 3 года назад
Hey Akash! Thanks for watching! 😃
@YuriyBaragin
@YuriyBaragin Год назад
Thanks bro 😀
@jaxlone997
@jaxlone997 Год назад
witty stuff for sure. thanks a lot
@mohanraj.j7647
@mohanraj.j7647 2 года назад
Thank you so much bro . this video is helpful and carrier growth Thank you so much
@am_subhadip
@am_subhadip 2 года назад
I BIG THANKYOU BRO. You are amazing
@S_Nayana
@S_Nayana Месяц назад
Perfect!!!
@WittCode
@WittCode 10 дней назад
😀
@mahdisafarpour1860
@mahdisafarpour1860 11 месяцев назад
that was awsome
@balajinaveen9090
@balajinaveen9090 Год назад
Thank you so much bro.. really understand bro..👍👍
@himalayanhighlander.8621
@himalayanhighlander.8621 Год назад
Thanks 🙏🙏
@captainmustard1
@captainmustard1 2 года назад
that was just amazing, you re awesome !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@amineaoukach1267
@amineaoukach1267 2 года назад
thank u a looot bro
@GABRIEL1030
@GABRIEL1030 Год назад
¡Gracias!
@ompatel7316
@ompatel7316 Год назад
nice video dude👍👍💖
@abdiellara7816
@abdiellara7816 Год назад
thank you!
@saifm5908
@saifm5908 Год назад
Thank you! Was really helpful video.
@abdulrauof5736
@abdulrauof5736 Год назад
Thnx mahn
@gautamprajapati2423
@gautamprajapati2423 2 года назад
Dose pycharm community addition work for this
@manasamopuri2859
@manasamopuri2859 2 года назад
thank you so much.. it was a very explanation. Thank you once again
@WittCode
@WittCode 2 года назад
Of course Manasa! Thank you for watching! 😃
@rutikasonak
@rutikasonak Год назад
Great video. Thanks a lot!
@lydiasaraswati517
@lydiasaraswati517 2 года назад
Thank you so much. I was struggling for a few days and this video has helped me out
@yashbeniwal9981
@yashbeniwal9981 2 года назад
Thanks❣
@swarupmazumder
@swarupmazumder Год назад
Thank you
@SantiagoParreli
@SantiagoParreli 2 года назад
Hola buen día Estoy usando mysql.connector pero en consola me muestra el usario y password en la consola, cómo se deshabilita esto ya que obviamente no quiero mostrar las credenciales porque esa salida la voy a guardar en un archivo, ya lo Googlie y no encuentro cómo
@alansteeve2235
@alansteeve2235 Год назад
can u to the same video for MAC OS connection
@yo-ds8ip
@yo-ds8ip 2 года назад
Thanks.
@darkodour5031
@darkodour5031 2 года назад
thanks man
@GiannisBak
@GiannisBak Месяц назад
thanks a lot
@WittCode
@WittCode 10 дней назад
😀
@this.is.teresa
@this.is.teresa Год назад
pycharm output says the above exception was direct cause of the following exception.
@mishel0312
@mishel0312 3 года назад
thank you man ! helped me a lot
@WittCode
@WittCode 3 года назад
Anytime Mishel! Thanks for watching! 😁
@navamisubhash9638
@navamisubhash9638 2 года назад
Thanks! great video!!!
@le_monsieur_stan4801
@le_monsieur_stan4801 2 года назад
Super video, thank you for your advices. Great job (y)
@arunisto
@arunisto 2 года назад
Awesome man. Thank you!
@WittCode
@WittCode 2 года назад
Of course Arun! Thank you for watching! 😀
@nicolawing5197
@nicolawing5197 3 года назад
Cool, you helped me, with my problem
@WittCode
@WittCode 3 года назад
That's great to hear Nicola! Glad I could help! 😀
@wyndhamwoo2851
@wyndhamwoo2851 3 года назад
Hi, great tutorial. I just want to ask if this can work when on other computers. For example if I want to use it in a public app. Or can it only work on my computer?
@WittCode
@WittCode 3 года назад
Hey there! Do you mean if you created an app with this database connection and had other users use it? If so, yeah it should work depending on how you deployed it!
@wyndhamwoo2851
@wyndhamwoo2851 3 года назад
@@WittCodeIt works locally on my pycharm but I want it to be able to work publicly online for anyone through github. But I am not sure if it will work publicly online as only I have the mysql database on my computer. If it can work though, do you know a way i can deploy it with github together with my code, do I need to upload mysql file and if so how would I go about it? If not should I just change it to not local host for it to work for anyone on any computer and how will i got about that?
@wyndhamwoo2851
@wyndhamwoo2851 3 года назад
@@WittCode It works locally on my pycharm but I want it to be able to work publicly online for anyone through github. But I am not sure if it will work publicly online as only I have the mysql database on my computer. Should I make it not localhost for it to work on github?
@dax_dc2608
@dax_dc2608 11 месяцев назад
I did exactly what you did but it is giving me some error now can you fix please?
@Python_Bacon
@Python_Bacon 2 года назад
I appreciate the video but mysql that I have on my computer looks nothing like yours and does not have the same options.
@user-ul6tf3dp9v
@user-ul6tf3dp9v Год назад
No way for me to connect... it keeps throwing at me the same crap. Traceback (most recent call last): File "C:\Users\flosr\pyver\py311\Lib\site-packages\mysql\connector\connection_cext.py", line 291, in _open_connection self._cmysql.connect(**cnx_kwargs) _mysql_connector.MySQLInterfaceError: Can't open named pipe to host: . pipe: MySQL (2)
@dhualshammaa2062
@dhualshammaa2062 2 года назад
do you have more example for mysql with python
@layronjancedrics.9260
@layronjancedrics.9260 2 года назад
Do you have a crud tutorial of this?
@info_lish3065
@info_lish3065 3 года назад
i did like yr video keep going
@WittCode
@WittCode 3 года назад
Thanks so much! 😃
@omniayahia723
@omniayahia723 3 года назад
thank you, keep going
@WittCode
@WittCode 3 года назад
Thanks for watching Omnia! 😀
@ramazankaratay2294
@ramazankaratay2294 Год назад
ALLAH RAZI OLSUN
@mohamedehsan8017
@mohamedehsan8017 3 года назад
Hello there, I have another issue. I had to reinstall PyCharm on a different laptop but can't see any packages in the python interpreter and I can't even add any due to the plus button being greyed out.
@WittCode
@WittCode 3 года назад
Hey good to hear from you again Mohamed! I haven't experienced this personally but you might have to actually add the actual online repository to pycharm. 1.) Go to Settings 2.) Project interpreter 3.) Click the + sign on top right edge 4.) Go to manage repositories, 5.) Press the + Sign, then add pypi.python.org/pypi 6.) Press Ok Let me know if this helps!
@mohamedehsan8017
@mohamedehsan8017 3 года назад
@@WittCode thanks a lot this helped a lot. Thanks again.
@xilin1063
@xilin1063 2 года назад
Thanks for your great video! I want to ask is there a method to mandate all the users like google's Firebase? Say, someone registers an account on another computer, and then his account status can be checked on my computer.
@wyndhamwoo2851
@wyndhamwoo2851 3 года назад
Hey I am having some trouble can you help me please?
@Andy-kr8jh
@Andy-kr8jh 3 года назад
thanks man
@WittCode
@WittCode 3 года назад
No problem Andy! Thanks for watching! 🤠
@sanjeevkumar-iw2lz
@sanjeevkumar-iw2lz 3 года назад
I am getting this=mysql.connector.errors.NotSupportedError: Authentication plugin 'caching_sha2_password' is not supported what I should do? I am not able to solve this issue from week. please help me.
@WittCode
@WittCode 3 года назад
Hey Sanjeev! Did you install the correct mysql connector at the beginning of the video? I have heard of this issue when the wrong connector is installed.
@sanjeevkumar-iw2lz
@sanjeevkumar-iw2lz 3 года назад
@@WittCode yes, I have installed the same connector which you have said.
@WittCode
@WittCode 3 года назад
@@sanjeevkumar-iw2lz Hmmm so another solution I can see is adding this to your connection constructor: auth_plugin='mysql_native_password'
@sanjeevkumar-iw2lz
@sanjeevkumar-iw2lz 3 года назад
@@WittCode yeahh, it worked, thanks.but can you please explain, what it is and why I have to do it.?
@WittCode
@WittCode 3 года назад
@@sanjeevkumar-iw2lz Great to hear! Which version of MySQL are you using? caching_sha2_password is the default authentication mechanism for MySQL 8.0. If what you are connecting to (here it is your MySQL server) uses a different form of authentication, then you need to use the auth_plugin argument to specify this!
@nurselikaya9479
@nurselikaya9479 3 года назад
Hello, firstly of all, ı liked your video but how can I send data from pycharm to sql
@WittCode
@WittCode 3 года назад
Hey Nurseli thanks for watching! Do you mean like instead of retrieving data from the database you want to insert data?
@nurselikaya9479
@nurselikaya9479 3 года назад
@@WittCode Yes exactly
@nurselikaya9479
@nurselikaya9479 3 года назад
@@WittCode can you take a video about like this
@WittCode
@WittCode 3 года назад
@@nurselikaya9479 I will definitely be making more videos on interacting with SQL and python but to do that it would simply be changing the SQL statement from where I said "select * from" to an SQL insert statement! If you look at W3 schools insert statement you'll learn the basics of how to do it 🤠
@adeshabhang44
@adeshabhang44 3 года назад
Hi buddy can you help me with my code
@WittCode
@WittCode 3 года назад
Hey Adesh! Sure what seems to be the problem?
@wyndhamwoo2851
@wyndhamwoo2851 3 года назад
I also have this error mysql.connector.errors.InterfaceError: 2003: Can't connect to MySQL server on '%-.100s:%u' (%s) (Warning: %u format: a number is required, not str)
@WittCode
@WittCode 3 года назад
Hey there! If you look online it seems that this could be an issue with your port number. Make sure the port you are specifying is the correct one. The default for MySQL is 3306 but you could have made it a different number when setting up your MySQL server. Let me know if this works!
@wyndhamwoo2851
@wyndhamwoo2851 3 года назад
@@WittCode hi it worked thanks
@WittCode
@WittCode 3 года назад
@@wyndhamwoo2851 Great to hear!
@wyndhamwoo2851
@wyndhamwoo2851 3 года назад
@@WittCode Do you know any way to import a database file (.db) into pycharm or to make one, perhaps from a csv file, so that it can be used like this. self.connection = sqlite3.connect("example.db")
@wyndhamwoo2851
@wyndhamwoo2851 3 года назад
@@WittCode I just want to ask if this can work when on other computers. For example if I want to use it in a public app. Or can it only work on my computer?
@Life-zx5wp
@Life-zx5wp 3 года назад
please make your text bigger, i can't see your screen clearly
@WittCode
@WittCode 2 года назад
Hey there! Thanks for the feedback I could definitely zoom in a little more! 😀
@appuva423
@appuva423 2 года назад
thanks bro😀
@udaymahajan1015
@udaymahajan1015 Год назад
thank you !
Далее
Python 101: Learn the 5 Must-Know Concepts
20:00
Просмотров 1,1 млн
Using MySQL Databases With Python Course
1:10:09
Просмотров 112 тыс.
PHP how to connect to MySQL database
8:50
Просмотров 13 тыс.
MySQL - The Basics // Learn SQL in 23 Easy Steps
17:17
Просмотров 833 тыс.