Join my free course on the basics of Flask-SQLAlchemy: prettyprinted.com/flasksql
@لنتسقطامةرسولهامحمدوصاحبهعمرال4 жыл бұрын
you are a genie for flask teaching.......nobody in all youtube can manipulate flask than you.......god bless you Sir and many thanks for your time and your light = learning
@Indikul3 жыл бұрын
I am very new to flaks and I'm creating a docker image with flaks app and mysql. I spend two whole days trying to connect these two containers with me lack of knowledge. Must have gone through hundreds to ways to connect these two. You video helped me a lot and super simple explanations. Thanks a million.
@sivakumaranbazhagan16722 жыл бұрын
Man, this SQL alchemy was way too complicated for a novice and there isn't enough info out there in the web to teach this stuff so simple and upto poin. Really a great job putting this info out for us.
@XadaiSantos4 жыл бұрын
Amazingly simple, straightforward video! Great job, really great
@TommiSvaerd5 жыл бұрын
Omg i needed this video last week, was stuck for 3 days with not being able to add the data to the db. However great video, and i learned about the cursor class :)
@Taridonov4 жыл бұрын
Ive seen lots of manuals and videos about flask+mysql, but yours is the most informative and clear. br< thank you VERY MUCH!
@prettyprinted4 жыл бұрын
You're welcome!
@axelamefia57912 жыл бұрын
Thank you friend, this helped me.
@run4ever102 Жыл бұрын
You saved my butt! Thanks man!
@Anshegar5 жыл бұрын
Important : if you can't install "flask-mysqldb", then you need "mysqlclient" and some time you cant install even "mysqlclient" , then you need install "weel mysqlclient" from here - www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient Thanks for lesson!
@rubychandra53393 жыл бұрын
Thanks, very simple and easy to use for basic learning
@omarelsebaey95892 жыл бұрын
that's brilliant to the point and it helped a lot
@sivakumaranbazhagan16722 жыл бұрын
for those using ubentu, if mysqlclient does not get installled via pip, try this ....sudo apt-get install python3-dev default-libmysqlclient-dev build-essential
@tusharpathade99143 жыл бұрын
Hey, nice video 👍. I have MySQL database locally on machine. Can you please tell how to config app then. I runs MySQL as sudo mysql from commandline
@ryanbiztech91813 жыл бұрын
Note that if you are using version control for your project such as a public Github repository, you should save sensitive data configurations such as passwords and keys in an instance folder which is automatically ignored by .gitignore.
@quianoherminigildojra.49893 жыл бұрын
nice explanation, I get it already.
@shubhamd17065 жыл бұрын
Thanks a Lot man!!! Perfectly Explained
@prettyprinted5 жыл бұрын
You're welcome! Thanks for watching.
@danielfaller56173 жыл бұрын
"... Ill leave a description in the link below" lmao 0:41
@suharsh964 жыл бұрын
Can you do a video on connecting mysql with sqlalchemy? Thanks
@MrArdo-branch-main4 жыл бұрын
Kami-Sama Thank you Very Much....my company said i should learn back-end and i don't know how and where to start..i heard they using mysql instead of sqlalchemy..
@noahbroyles88284 жыл бұрын
Great video! Interested to see how this would be done in a flask application with multiple .py files and blueprints
@yanafinn4 жыл бұрын
how do you update the data in flask form?
@thealwayshungryjimmy99994 жыл бұрын
@pretty printed, what if i have a column in innodb mysql that is called reportID and i needed it to auto increment?
@phildeman79053 жыл бұрын
Can the mysql configuration be place in a file with any name (ie: mysqlconfig.py) or must this be added to an already existing routes.py file? Also, you set the MYSQL_CURSORCLASS to DictCursor, yet the results in your example came back as a tuple. How do I get the results returned as a list?
@123cookies4life3455 жыл бұрын
Hi Anthony! What is the best way to pass the results of a query to a jscript file referenced in a html-template?
@ferooyahya41384 жыл бұрын
can i do this dynamically? for example, for every student logs in and do some actions, a table will be fill in with all student details? is it possible? and thanks for this great video!!
@harshilshah89832 жыл бұрын
Hey, I have created a flask app that has a simple form where you give your name and job role and submit. The output will be directed to another route and displayed on webpage. But now I also want to add Microsoft SQL server in middle that will store the values of form and still give the output on website. I will be using SQL server authentication. I have successfully tried it without form or creating routes. Like manually storing data in SQL server using flask sqlalchemy. But when I use forms and create routes, than I get stuck.
@jyotimehra4693 жыл бұрын
How can we use this for prepared statements in mysql?
@TashieTash4 жыл бұрын
such a great video, it definitely helped me out.
@ajaykumark1075 жыл бұрын
Great tutorials!! Just discovered your channel. Do you have more videos on My SQL topic? Which is better among MySQL & SQLLite?
@prettyprinted5 жыл бұрын
I don't cover SQL directly much on this channel. I like sqlite more for my projects to keep things simple, but I've used MySQL as well, and it has worked fine for me.
@regnartek4 жыл бұрын
Ecellent Video
@merchaouiaymen89173 жыл бұрын
How can we retrieve the tuples into vuejs ?
@goodmusic2845 жыл бұрын
Thanks! Can you please show me how to deploy this to heroku?
@caramessina95935 жыл бұрын
I would also like this! I am able to access the SQL DB on my local server, but when I try to access the DB on Heroku, I keep getting the "Internal Server Error."
@goodmusic2845 жыл бұрын
@@caramessina9593 i am still stuck. I deployed it on a Ubuntu webserver instead. Please post a tutorial here if you figured it out.
@caramessina95935 жыл бұрын
@@goodmusic284 I think I figured it out! So on Heroku, you have to create a DB within Heroku. You can do this once you login into your app by going to "resources" and then in the search box doing "MYSQL." ClearDB MySQL should come up, which is what I am using. Then, once you have that database created on your Heroku account, go to the "Settings" and "Reveal Config Vars." It will give you a url that looks like this: mysql://letters123:letters456@us-cdbr-iron-east-05.cleardb.net/heroku_letters123?reconnect=true (except the "letters123" will be unique for your DB). You then enter in on your Flask app that information. Host: us-cdbr-iron-east-05.cleardb.net Database: heroku_letters123 username: letters123 password: letters456 It also wasn't working for me, and I realized I needed a secret key. I added this to my app.py file: app.secret_key = "mysecretkey" (except make it your own secret key). I hope that's helpful! OH you can also dump an already-existing MySQL database into the heroku database. I don't know how, but you can probably find an online tutorial.
@satyamuralidharpeddireddi61925 жыл бұрын
i have executed it locally it will work while iam creating same code into docker images it will show like #cur = MySQL.connect() getting error
@mp33114 жыл бұрын
Should I use Flask SQLAlchemy instead? Is mysql offering the same functionality for a flask application as sqlAlchemy?
@anmolsingh49694 жыл бұрын
Orm bro
@LGseeker5 жыл бұрын
I am getting this erorr *Instance of 'MySQL' has no 'connection' member pylint(no member) [19, 11]*
@mitchellsotelo26965 жыл бұрын
just replace: cur = mysql.get_db().cursor()
@sebastiancastillo35605 жыл бұрын
Oh Yes! Thanks Anthony !!
@misterp81285 жыл бұрын
ModuleNotFoundError: No module named 'MySQLdb' any idea why I get this error?
@tylermitchell1854 жыл бұрын
I may be a little late, but just in case try "pip install [module name]" in the windows command prompt everytime you get an error similar to this
@BaconBitsJuice2 жыл бұрын
"I'll leave a description in the link below" lol fucking fantastic guide though!
@mohammedkastali70962 жыл бұрын
how can i delete record please
@ferooyahya41384 жыл бұрын
okay, i tried to do (from flask_mysqldb import MySQL) but gives me error cuz i don't have the package, i tried some workaround like pip3 install flask-mysql pip install MySQL-Python but nothing happened really! it also gives me (ConfigParser) error and tried different solutions. it also gives me (mysql_config not found). I am completely lost and don’t know how to fix these errors. I’d appreciate your help!
@anmolsingh49694 жыл бұрын
Python 3x version not support mysql db I have same problem
@deadshot48885 жыл бұрын
Access denied for user 'root@localhost' (using password:NO) I am using workbench. please help
@vishalipalav45185 жыл бұрын
Thank you
@asthasingh80515 жыл бұрын
How to delete an entry made in database ? I am jot able to delete the data entered
@tanishq27665 жыл бұрын
go for freecodecamp.org mysql tutorial....mysql is an pretty easy language to learn! One day would be enough to learn imo :)
@shardulkulkarni10084 жыл бұрын
how to hide password while adding this code in production?
@pieterwaters84503 жыл бұрын
is it just me or did he say check the description in the link at 0:42 lol.. thanks for the great vid tho
@sivakumaranbazhagan16722 жыл бұрын
But dude, why triple quotes for sql statements?
@amycai38674 жыл бұрын
I got error when I try to install mysqldb with command: pip install flask-msqldb Error: error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2 Anyone have same problem? Please help to give solution if you fixed it already. Thanks!
@JonNordland4 жыл бұрын
I have same problem... Have not found a solution.
@myrongrade64204 жыл бұрын
@@JonNordland This may be due to the incorrect version of Python installed. Make sure you have installed 64bit if your machine is 64bit and 32bit if 32. I was having the same error and once I redownloadedd python and left the install in its default location I was not getting the error anymore