Тёмный

Python with MySQL database in one video with Project 

Learn Code With Durgesh
Подписаться 302 тыс.
Просмотров 98 тыс.
50% 1

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

 

25 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 106   
@niharp1878
@niharp1878 2 года назад
I really enjoyed this Video. While using MySQL I did observe if a record doesn't exist in DB and we try to delete it, it doesn't actually throw an error or alert that the user doesn't exist. But I managed it through Python. Below is an example of Insert def list_user_id(self): query = "select user_id from user" cur = self.con.cursor() cur.execute(query) record = [item[0] for item in cur.fetchall()] return record choice=int(input("enter your choice of 1 2 3 4 or 5 from above menu ")) if choice == 1: user_list = helper.list_user_id() user_id=int(input("Enter the user_id ")) if user_id not in user_list: name=input("Enter the name ").capitalize() phone=input("Enter the phone ").capitalize() helper.insert_user(user_id,name,phone) else: print("user {} already in database, please use update instead".format(user_id))
@HardikPatel-ct4tj
@HardikPatel-ct4tj 5 месяцев назад
Excellent demonstration. Thanks for the video.
@funnyhub8717
@funnyhub8717 3 года назад
Tomorrow is my board Practical 2020-21 of computer science and it helps me alot
@ehsanafzal185
@ehsanafzal185 2 года назад
27:37 def fetch_id(self): query = "select UserID from user" cur = self.con.cursor() cur.execute(query) for row in cur: my_format = "UserID:{}" print(format(row[0]))
@rahulmca598
@rahulmca598 2 года назад
If you facing this type of error when connecting SQL database with python error like"Traceback(most recent call last): ....Just run this command "pip install mysql-conncetor-python"). It worked for me..
@avinashjadhav9265
@avinashjadhav9265 Год назад
Your teaching technique is legendary sir
@mantoshyadav9242
@mantoshyadav9242 2 года назад
Really this video is very helpful for me. Thanks 👍
@dehumanizer668
@dehumanizer668 2 года назад
Ek number sir!! Really wanted this!
@Networking_Bytes
@Networking_Bytes Год назад
Nice Explanation. This helped me.
@mohammadriyad6542
@mohammadriyad6542 2 года назад
I'm from Bangladesh. First of all, this is changed my mind for web development. Everytime I'm heard about python is not connect mysql database. You save my life.. Thanks a lot sir. And out of topic, can you tell which VSCode theme and extension you use in this video
@abhisheksajjanar
@abhisheksajjanar 11 месяцев назад
Sir your are the best.
@mustkeemkhan7538
@mustkeemkhan7538 2 года назад
That is amazing for me. Thankyou sir
@priyankpatel5501
@priyankpatel5501 3 года назад
AMAzing Work It helped me for my CBSE project
@priyankareddy2178
@priyankareddy2178 2 года назад
Thank you so much for a detailed tutorial. I was able to create a great program by using your guidelines. ☺️
@Mrroy08657
@Mrroy08657 2 года назад
What are the Complete Roadmaps to be a Power BI Specialist & Data Analyst also. Which are very important to learn & practice in SQL & Power BI. ? Exactly which portions of Python needed ? Pls Guide me Step by step 🙏
@anuragarunedlabadkar8889
@anuragarunedlabadkar8889 Год назад
Wonderful video. Too much informative.
@razuahmedrafi8905
@razuahmedrafi8905 3 года назад
excellent work sir
@akashmodak8398
@akashmodak8398 4 года назад
sir apki teaching bohat achihe plz sir Android studio full video bnao our mere friends ko bhi boluga dekhne ke liye
@anurag17091977
@anurag17091977 3 года назад
Durgesh, this is very informative and interesting video. I found this video very interested and helpful. Thank you very much and keep it up.
@pranavgupta4065
@pranavgupta4065 3 года назад
if someone is getting this error "Authentication plugin 'caching_sha2_password' is not supported"... 1. then uninstall mysql-connector and install mysql-connector-python 2. add auth_plugin='mysql_native_password' as one more parameter .
@djrobert9207
@djrobert9207 3 года назад
Thanks a lot bro.
@rushivchandarana785
@rushivchandarana785 3 года назад
File "c:\Users\Lenovo\Desktop\PythonMysql\main.py", line 3, in con=connector.connect(host='localhost', File "c:\Users\Lenovo\Desktop\PythonMysql\mysql\connector\__init__.py", line 179, in connect return MySQLConnection(*args, **kwargs) File "c:\Users\Lenovo\Desktop\PythonMysql\mysql\connector\connection.py", line 95, in __init__ self.connect(**kwargs) File "c:\Users\Lenovo\Desktop\PythonMysql\mysql\connector\abstracts.py", line 716, in connect self._open_connection() File "c:\Users\Lenovo\Desktop\PythonMysql\mysql\connector\connection.py", line 208, in _open_connection self._do_auth(self._user, self._password, File "c:\Users\Lenovo\Desktop\PythonMysql\mysql\connector\connection.py", line 144, in _do_auth self._auth_switch_request(username, password) File "c:\Users\Lenovo\Desktop\PythonMysql\mysql\connector\connection.py", line 167, in _auth_switch_request auth = get_auth_plugin(new_auth_plugin)( File "c:\Users\Lenovo\Desktop\PythonMysql\mysql\connector\authentication.py", line 190, in get_auth_plugin raise errors.NotSupportedError( mysql.connector.errors.NotSupportedError: Authentication plugin 'caching_sha2_password' is not supported I'm still getting this error, please help to resolve.
@Hemarawal122
@Hemarawal122 Год назад
Thanks
@sumanthgunna2408
@sumanthgunna2408 Год назад
def fetch_id(self,userId): query = "select * from user where userId = {}".format(userId) cur = self.con.cursor() cur.execute(query) for row in cur: print("user Id :",row[0]) print("user name :",row[1]) print("user phone :", row[2]) print()
@bhavanasingh7134
@bhavanasingh7134 3 года назад
def fetch_with_id(self,userid): query = "select * from user where userId='{}'".format(userid) cur = self.con.cursor() cur.execute(query) for row in cur: print("User Id :",row[0]) print("User Name :",row[1]) print("User Phone :",row[2]) helper.fetch_with_id(1952)
@ravishankar2180
@ravishankar2180 3 года назад
17:55 actually you can use seft or whatever you want. no necessary to use self.
@mohammadibrahimclass-11-1m2
@mohammadibrahimclass-11-1m2 2 года назад
excellent
@faisalharoon3887
@faisalharoon3887 Год назад
like you make one table here if we want to make multiple table using this approach what should we do?
@manishadas3398
@manishadas3398 2 года назад
Sir you explaination is very crystal clear thanks for this awesome video
@pratikghimire
@pratikghimire 3 года назад
Great video for beginners
@kaal970
@kaal970 4 года назад
superb bro .. great mjhay laga tha boring hoga .. lekin you are going with proper concepts ...nice work ...this video is meant to be for people who have concepts of data base and programming jaisay constructor ,database etc ... islixay mjhay help kia
@bipultimes613
@bipultimes613 3 года назад
if there was python, django, mysql, html and css involved project...then it would have been better
@LearnCodeWithDurgesh
@LearnCodeWithDurgesh 3 года назад
Already there on channel in video ... Blogging project
@songsremixz885
@songsremixz885 Год назад
@@LearnCodeWithDurgesh link do na bhai please
@stevemarshall2358
@stevemarshall2358 3 года назад
Excellant
@krishnamurari074cs-b8
@krishnamurari074cs-b8 3 года назад
Thanks you so much 👍👍👍👍👍👍👍🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏 I am very happy sir 🙏
@arpittrivedi6636
@arpittrivedi6636 2 года назад
def fetch_from_id(self,id): query="select * from user where userid={}".format(id) cursor = self.conn.cursor() cursor.execute(query) for row in cursor: print("Userid :- ", row[0]) print("User Name :- ", row[1]) print("Phone :- ", row[2])
@binauralbeats-relaxingmusi4336
@binauralbeats-relaxingmusi4336 8 месяцев назад
Html csss js python aur my sql ko use krke full stack website ban skti??
@ehsanafzal185
@ehsanafzal185 2 года назад
33:04 # update function def update_record(self, _userid, _name, _phone): query = "update user set UserID={},userName='{}',phoneNumber={}".format( _userid, _name, _phone) cur = self.con.cursor() cur.execute(query) self.con.commit() print("record updated")
@ssbigdata6732
@ssbigdata6732 3 года назад
Sir, In this console application you are using if,elif,else to execute user choice. Please write dictionary with key value pair key will be user choice and value will be function name to be called with parameters. If, Possible please add one video on this.
@razuahmedrafi8905
@razuahmedrafi8905 3 года назад
def fetch_all(self,userID): query = "select * from user_table where userID='{}'".format(userID) cur = self.con.cursor() cur.execute(query) for row in cur: print("User id: ",row[0]) print("User Name: ",row[1]) print("User Phone: ",row[2]) print() print() helper.fetch_all(101) sir i would like to show information id ''101''
@anytimeanywhere4163
@anytimeanywhere4163 Год назад
if someone facing ......such kind of error like ....... MySQL.connector.errors.NotSupportedError: The authentication plugin 'caching_sha2_password' is not supported .....then they will have to use this auth_plugin='mysql_native_password') much code also then they will get out of the error
@gupta22_
@gupta22_ 4 года назад
Sir , For choice =5 you have given break statement,but actuaaly break will exit the loop not terminate the program,so for termination i have used sys.exit()
@LearnCodeWithDurgesh
@LearnCodeWithDurgesh 4 года назад
Yes you can do so but break also serves the same purpose for this problem...
@gupta22_
@gupta22_ 4 года назад
@@LearnCodeWithDurgesh Ok sure sir
@Ariexx_devotional_Xtreme
@Ariexx_devotional_Xtreme 3 года назад
hi sir my name is sumit and i'm a bigenner in python i watched your full video after that i add 2 column as salary and addres i face some touple index issu , sir plzz can help me to resolve it??
@anytimeanywhere4163
@anytimeanywhere4163 Год назад
To use the class, first, you will have to create an instance after that I will work properly
@binauralbeats-relaxingmusi4336
@binauralbeats-relaxingmusi4336 8 месяцев назад
Sirf backend ke liye sufficient hai?
@vishwajeetyadav2686
@vishwajeetyadav2686 3 года назад
Great job bro
@creative.creation
@creative.creation Год назад
Great teaching ❤️ Can I please get this project complete code??
@MOHDRASHID-gf8qf
@MOHDRASHID-gf8qf 3 года назад
Sir please 1 ML project bnaye jisme hm python file mein aur flask app mein mysql database use kare aur deploy kr sake usko server pr
@kiranpatil4968
@kiranpatil4968 11 месяцев назад
Please sir can you make etl testing framework using python pytest framework asap
@pranavgupta4065
@pranavgupta4065 3 года назад
Sir please btaiye ki hum ye saare operations jab kr skte the Mysql me hi to hume python se krne ki kya zaroorat padi?? please reply sir @LearnCodeWith Durgesh
@ehsanafzal185
@ehsanafzal185 2 года назад
done 👍👍👍👍👍👍👍👍
@zarvidal6467
@zarvidal6467 Год назад
sir can you show the output into browser not in command line? thank you!
@swathivenkatesh465
@swathivenkatesh465 3 года назад
Very good tutorials!
@kratisahai2635
@kratisahai2635 Год назад
Can this project be included in resume for placement
@hoosier-daddy465
@hoosier-daddy465 Год назад
Wish these had English subtitles
@veer2395
@veer2395 2 года назад
I made a program for username and password with pycharm and xamp database ... Every username and password entered is registered in database. What command i should use so that if user inputs same username that's already been registered in the database , it shows error with message username already in use try different username
@monicadesai7928
@monicadesai7928 4 года назад
Eye gazing controlled keyboard using python-opencv video banao and i will integrate that with audio...pls
@shortvd969
@shortvd969 2 года назад
sir i request you , plzz make a search function Enter Id to search
@shinigamiryuk4183
@shinigamiryuk4183 3 года назад
can I link html, css, mysql using python but without using any framework like django or any other
@LearningWithFun333
@LearningWithFun333 3 года назад
i wrote the same code till 28:00, yet i am only getting "created" as the output. the output should not defer with the IDE used. I usually write on pycharm yet I did not receive the same output as in the video.
@ankitabelekar
@ankitabelekar Год назад
I my internship project while insert query in mysql getting cursor not connected error repeatedly. Checked everything, but error not solved
@ehsanafzal185
@ehsanafzal185 2 года назад
done it bit different..........change the menu text with red and all the code is made with function
@swapnabirdutta7849
@swapnabirdutta7849 4 года назад
Sir ,Can you please tell me which theme you are using?
@MuhammadAsif-mb3nk
@MuhammadAsif-mb3nk 2 года назад
why I am facing this issue self is aleady define why this error is coming File "c:\Users\Dell\Desktop\python with mysql\main.py", line 3, in class DBHelp(): File "c:\Users\Dell\Desktop\python with mysql\main.py", line 11, in DBHelp cur = self.con.cursor() NameError: name 'self' is not defined
@utkarshjain6755
@utkarshjain6755 2 года назад
Thanks sir for this video, if possible please give this code or anyone...
@CoderBB
@CoderBB 3 года назад
Sir python me asynchronous programming pe series start kro plzzzz
@jaganjls1901
@jaganjls1901 4 года назад
Hi, thanks for this video. which python version you used?
@DhruvPatel-xv2zd
@DhruvPatel-xv2zd 4 года назад
Sir tensorflow ka tutorial bnao na..!!
@channuangadi8506
@channuangadi8506 2 года назад
Sir when Deleting the item .even after the item not in the table it showing deleted ..........
@allahkabaap6421
@allahkabaap6421 2 года назад
Bro this was good, but you could have wrapped everything in 25 min, you were telling lot of obvious things which were not necessary to be explicitly explained.
@samruddhisaoji7195
@samruddhisaoji7195 2 года назад
what was obvious to you may not be obvious to somebody else
@amitarote547
@amitarote547 Год назад
Hi I am facing some problem in connection
@ehsanafzal185
@ehsanafzal185 2 года назад
from colorama import init, Fore, Back, Style # essential for Windows environment init() # all available foreground colors FORES = [Fore.BLACK, Fore.RED, Fore.GREEN, Fore.YELLOW, Fore.BLUE, Fore.MAGENTA, Fore.CYAN, Fore.WHITE] # all available background colors BACKS = [Back.BLACK, Back.RED, Back.GREEN, Back.YELLOW, Back.BLUE, Back.MAGENTA, Back.CYAN, Back.WHITE] # brightness values BRIGHTNESS = [Style.DIM, Style.NORMAL, Style.BRIGHT] def print_with_color(s, color=Fore.WHITE, brightness=Style.NORMAL, **kwargs): """Utility function wrapping the regular `print()` function but with colors and brightness""" print(f"{brightness}{color}{s}{Style.RESET_ALL}", **kwargs) # printing all available foreground colors with different brightness # for fore in FORES: # for brightness in BRIGHTNESS: # print_with_color("Hello world!", color=fore, brightness=brightness)
@yashasmore9341
@yashasmore9341 2 года назад
Sir the phone number column is giving error when i pass 10 digits why?
@arindamghosh636
@arindamghosh636 2 года назад
41:44
@anjanas_acedamy_at_Reckon
@anjanas_acedamy_at_Reckon 2 года назад
mysql.connector.errors.InterfaceError: 2003: Can't connect to MySQL server on 'localhost:3306' (10061 No connection could be made because the target machine actively refused it) i got this error while using the same method please help
@rahulkumarvarma6178
@rahulkumarvarma6178 3 года назад
where can i gate this code
@abdulwajid7941
@abdulwajid7941 3 года назад
sir when i run the program i got this error Traceback (most recent call last): File "C:/Users/user/Desktop/Python_with_MySql/main.py", line 1, in import mysql.connector as connector ModuleNotFoundError: No module named 'mysql' pls. help me to out
@shivammeena4439
@shivammeena4439 3 года назад
You have to install mysql first
@aditisharma5745
@aditisharma5745 2 года назад
Hey!! try to use pip install mysql-connector-python instead of pip install mysql-connector if not working. Cuz i also caught with the same issue. and it works for me.
@aditisharma5745
@aditisharma5745 2 года назад
Getting error while creating table. raise AttributeError(item) AttributeError: con Help me with this
@waqasbhatti4478
@waqasbhatti4478 4 года назад
Sir python ku xampp server sa kaisa connect karain
@monicadesai7928
@monicadesai7928 4 года назад
This error .....how to solve...? (base) C:\Users\Monica\Desktop\Projects\PythonwithSQL>python main.py Traceback (most recent call last): File "main.py", line 7, in from dbhelpers import DBHelper ImportError: cannot import name 'DBHelper' from 'dbhelpers' (C:\Users\Monica\anaconda3\lib\site-packages\dbhelpers\__init__.py)
@akashdhakad5106
@akashdhakad5106 2 года назад
❤️
@ChoudharyinUSA
@ChoudharyinUSA Год назад
can i get the code of this video
@HarpreetSingh-s4smarty
@HarpreetSingh-s4smarty 2 года назад
Where to get source code ?
@sureshKumar-el5dw
@sureshKumar-el5dw 2 года назад
bro am getting an error in cmd
@ankitchawla8487
@ankitchawla8487 4 года назад
my pip install mysql-connector didnt work in python so I did pip install mysql-connector-python
@matheusmoreira9632
@matheusmoreira9632 3 года назад
What language is it?
@ArnobRahat
@ArnobRahat 3 года назад
Hinlish
@monicadesai7928
@monicadesai7928 4 года назад
I got my error....mistake with name spelling and packages spelling
@vsaichandu3967
@vsaichandu3967 4 года назад
Bro please send me the source code
@aritmistri8290
@aritmistri8290 3 года назад
Mujha fervi syntax error de ra he
@aritmistri8290
@aritmistri8290 3 года назад
import mysql.connector as a class DBHelper: def __init__(self): self.con = a.connect(host='localhost',port = '3306',user='root',password="gopalmistri@12345", database='pythontest') query = 'create table if not exits user(userId int primarykey, userName varchar(200), phon varchar(12))' cur = self.con.cursor() cur.execute(query) print('conected') # min\ helper = DBHelper() still problm
@vsaichandu3967
@vsaichandu3967 4 года назад
@learncodewith please send me source code
Далее
Бокс - Финты Дмитрия Бивола
00:31
Learn MySQL in one video [Hindi]
1:45:46
Просмотров 587 тыс.
Solving one of PostgreSQL's biggest weaknesses.
17:12
Просмотров 207 тыс.
Using MySQL Databases With Python Course
1:10:09
Просмотров 112 тыс.
SQLite Databases With Python - Full Course
1:29:37
Просмотров 680 тыс.
5 Mini Python Projects - For Beginners
1:41:08
Просмотров 2,8 млн