How to Create a Database, Add Tables and Import Data in MySQL Workbench

Поділитися
Вставка
  • Опубліковано 3 лют 2025

КОМЕНТАРІ • 376

  • @Bella_Noches_
    @Bella_Noches_ Рік тому +1

    WOW! This video is absolutely awesome! Never had such clear instructions on using the MySQL workbench and you helped me avoid a headache for my homework assignment. Your instructions worked like a charm!!

  • @markward8483
    @markward8483 3 роки тому +20

    Thanks Matt, great tutorial easy to follow. All what I needed to learn for my course! Love UA-cam, just keeps giving!

  • @ashleybattiata8912
    @ashleybattiata8912 Рік тому

    I feel like I've learned more in this video than all semester. You rock!

  • @kothon1
    @kothon1 3 роки тому +11

    Dude, your tutorial is just so simple to understand. Thank you!!!

  • @simonadong4512
    @simonadong4512 3 роки тому +1

    This is SUPER HELPFUL thank you!! I glanced through so many articles which all made no sense to me...but this video is so on point

  • @oyewoleayorinde7864
    @oyewoleayorinde7864 Рік тому

    This is one of the best tutorials on this subject matter. Thanks so much

  • @benlall215
    @benlall215 2 роки тому

    This was extremely helpful. Thank you! All the other videos say its for beginners and then fail to explain the most rudimentary steps... Thank you!

  • @mariaalejandraperpinanbarr3535
    @mariaalejandraperpinanbarr3535 3 роки тому +1

    Thaaanks! One of the best tutorials I've seen

    • @MattMacarty
      @MattMacarty  3 роки тому

      Thanks very much. Glad it helped.

  • @derelictmanchester8745
    @derelictmanchester8745 2 роки тому +2

    Thanks, Matt, really clear and concise..

  • @mikaeluhl
    @mikaeluhl 3 роки тому +3

    Thanks! i had to import a csv that my teacher made and i was struggling with the 'date' situation.. his file had the year coming last and i was using date :P when you explained that years in date should come first you gave me the answer i couldn't find after hours of search

  • @banjoomotola8583
    @banjoomotola8583 3 роки тому +4

    This was so useful to my learning. So happy I found this. Great job!

  • @nitinkymar9468
    @nitinkymar9468 2 роки тому

    One of the best tutorial on mysql. Thank you very much!!

  • @Skjoldr16
    @Skjoldr16 Рік тому

    Hi Matt, thanks so much for the clear and beginner-friendly tutorial, this definitely helped me a lot.

  • @rriimt1556
    @rriimt1556 2 роки тому +1

    Excellent tutorial to learn database....thankyou very much sir..

  • @lebom8076
    @lebom8076 5 місяців тому

    The only video that helped me. Because of that, i subscribed🎉

  • @emekaukwuoma3359
    @emekaukwuoma3359 3 роки тому +2

    Thanks Matt, this was super explanatory. I can create a database table thanks to you.

  • @felipecruz3061
    @felipecruz3061 Рік тому

    I am so glad i found this video... amazing. Thank you buddy

  • @maverickpeck6012
    @maverickpeck6012 3 роки тому +2

    This is extremely helpful, just doing an intro database design class and this video helped me a ton!

  • @waxtin48
    @waxtin48 3 роки тому +2

    This is exactly what I needed thanks a million

  • @unnatirai_07
    @unnatirai_07 4 місяці тому

    Amazing explanation and hat's off to your efforts. Thanks

  • @the9263
    @the9263 2 роки тому

    This is amazing. I'm following here with my laptop haha

  • @Cpeters0
    @Cpeters0 2 роки тому

    Very easy to follow and understand... 2 thumbs up!!

  • @ThuHuongHaThi
    @ThuHuongHaThi 3 роки тому

    Thanks a lot, I have been in trouble with it for so long

  • @Cebuanoontwowheels
    @Cebuanoontwowheels 2 роки тому

    Felt like i was listening to vin Diesel. Thank you dude!!

    • @MattMacarty
      @MattMacarty  2 роки тому

      LOL. Someone else said the same thing. Glad it helped.

  • @adrijesus1981
    @adrijesus1981 3 роки тому +6

    Oh God, you have a database called "Frodo"! Cool :-D

  • @jonlbs7
    @jonlbs7 3 роки тому +1

    Best tutorial I've seen .. Thank you !! ✨✨👍😊

    • @MattMacarty
      @MattMacarty  3 роки тому

      Thanks very much. Glad it helped.

  • @BellTollsForThee
    @BellTollsForThee 2 роки тому +1

    This tutorial is amazing! Thank you a bunch! I loved the explanation of issues with data types!

  • @mannahidruhidru812
    @mannahidruhidru812 3 роки тому +1

    thank you so much you are just amazing, perfect explanation

  • @lugonzales8980
    @lugonzales8980 2 роки тому

    Thank you for making this easy!

  • @reeseverschelde758
    @reeseverschelde758 2 роки тому

    Incredibly helpful video, thank you.

  • @greenblue980
    @greenblue980 9 місяців тому

    thanks alot! i forgot about that lightning thing 😂

  • @keithlamontdavis8047
    @keithlamontdavis8047 2 роки тому

    Well done. Very useful and very clearly explained. Newly subbed!

  • @BabaYAGA_OW
    @BabaYAGA_OW Рік тому

    Thanks man! Really good tutorial

  • @lukewilliams4758
    @lukewilliams4758 3 роки тому

    thanks for teaching us what you know I can finally make my website

  • @browngift3408
    @browngift3408 2 роки тому

    You are a life saver Matt. Thanks so much

  • @jayshree144
    @jayshree144 4 роки тому

    very helpful in importing an excel file. thankyou

  • @charleskp947
    @charleskp947 3 роки тому

    thanks so much.... your voice is awesome too... should be voice over artist

    • @MattMacarty
      @MattMacarty  3 роки тому

      Thanks for the compliment. I am glad it helped.

  • @dwest889
    @dwest889 2 роки тому

    Excellent tutorial

  • @nayaroni
    @nayaroni 2 роки тому

    Thank you for this tutorial!!!

    • @MattMacarty
      @MattMacarty  2 роки тому

      Glad it helped

    • @nayaroni
      @nayaroni 2 роки тому

      @@MattMacarty can you do a video on Stored Procedures? I am struggling with it:/

  • @casperj4784
    @casperj4784 3 роки тому +1

    Thank you very much for this video. I'll have a look at your others, but I'd be interested to know how to import data that needs to be separated into different tables.

    • @MattMacarty
      @MattMacarty  3 роки тому

      There are a couple of options. You could import it all at once and then separate into tables or just import one on by one and add relationships when you have imported everything.

  • @adekunleshokunbi9541
    @adekunleshokunbi9541 Рік тому

    Thank you Matt for this comprehensive video. I still have issues on trying to set up my workbench and server😢 How can I go about this?

    • @MattMacarty
      @MattMacarty  Рік тому

      Which version of MySQL are you trying to install? Windows or MAC?

  • @jayanthim2039
    @jayanthim2039 3 роки тому

    Nice explaination, and very understandable... Thank you bro..

  • @lyjunsay2852
    @lyjunsay2852 4 роки тому

    you sound like the guy from Khan Academy. Great job on this! Very helpful tutorial!

  • @christv0811
    @christv0811 Рік тому

    Nice this is so clear

  • @joeryder5739
    @joeryder5739 Місяць тому

    Thank you Matt.

  • @grannah2050
    @grannah2050 Рік тому

    Very helpful, thank you

  • @Bakemono10
    @Bakemono10 2 роки тому

    Life Saver tutorial!!!

  • @bsbteck
    @bsbteck Рік тому

    Greate Job Sir

  • @joycewang7373
    @joycewang7373 3 роки тому

    Thank you Matt, the vedio did help me to learn mysql as a beginner. Could you please advise if you have more vedio of mysql on UA-cam? I would like to study mysql with your further vedioes. Looking forward to more vedioes

    • @MattMacarty
      @MattMacarty  3 роки тому

      Hi I have a few videos for beginners: ua-cam.com/play/PLiPFKCVZWHKq3RvwDxosNm5Ny7cHyfc4o.html

    • @joycewang7373
      @joycewang7373 3 роки тому

      @@MattMacarty Thank you very much!

  • @Mr.nikk62
    @Mr.nikk62 Рік тому

    thank you so much sir

  • @zhiqiangzheng5985
    @zhiqiangzheng5985 3 роки тому

    Thank you, it helps a lot

  • @mansitomar8549
    @mansitomar8549 2 роки тому

    great great great video.........

  • @safezone6479
    @safezone6479 2 роки тому

    Thank you sir

  • @daniel3897
    @daniel3897 3 роки тому

    Great tutorial. Thanks a lot Matt!!

  • @milkandeto1622
    @milkandeto1622 4 місяці тому

    So helpful.

  • @augustusprime0_o
    @augustusprime0_o 3 роки тому

    great tutorial, thanks!

  • @devconnie
    @devconnie Рік тому

    Tks Matt. Appreciate it.

  • @statisticstutorial6053
    @statisticstutorial6053 Рік тому +1

    tq sooooo much

  • @bushidoGF
    @bushidoGF 3 роки тому

    Thank you for this

  • @devconnie
    @devconnie Рік тому

    Matt, tks for your reply and tried to download the file. However, the data file did not open and link with the database, and maybe I was doing something wrong. If you put a video about downloading and linking the data that would be great. tks.

    • @MattMacarty
      @MattMacarty  Рік тому

      OK. You have a couple of options here. You can download the files as a .zip and then extract them or you can clone the github repository. Let me see if I can get a tutorial together.

  • @ajeetdubey1308
    @ajeetdubey1308 3 роки тому

    Really so helpful ❤️

  • @marcelojunior4301
    @marcelojunior4301 3 роки тому

    Thank you so much for this!

  • @divyanshupawar8069
    @divyanshupawar8069 3 роки тому

    Very helpful

  • @maheshdravidar3694
    @maheshdravidar3694 Рік тому +1

    Hi Matt, First of all thanks for brilliant videos. I am loving it. Now to the question, i am trying to import the file to change the date format but while loading the through import wizard, its loading zero data. I am following all your steps mentioned from 11:50, please advise what am i missing.

    • @MattMacarty
      @MattMacarty  Рік тому

      So you mean the date is in some format other than ISO? I would try to import the date column as text and then convert it in MySQL to see if that works better.

  • @hoormallick879
    @hoormallick879 3 роки тому

    Amazing it helped alott💓

  • @fact4education
    @fact4education 2 роки тому

    Thank you!

  • @SINNER460
    @SINNER460 3 роки тому

    OMG .. Perfect ...well explained. You really helped me. Thank you.

  • @Alice-r9v5i
    @Alice-r9v5i 3 місяці тому

    Wonderful

  • @lesliee.4525
    @lesliee.4525 2 роки тому +1

    I'm getting an error that says "unhandled exception 'charmap' codec can't decode byte 0x9d in position 2155: character maps to " do u know how I could fix this?

    • @MattMacarty
      @MattMacarty  2 роки тому

      This sounds like there are some characters in your data that MySql can't deal with. Try opening the data file in a simple text editor to see if you can find and remove any odd looking characters. They should be pretty obvious.

    • @lesliee.4525
      @lesliee.4525 2 роки тому

      @@MattMacarty ok thanks

  • @yogesh9149
    @yogesh9149 2 роки тому +1

    Thanks....

  • @armelmahunan851
    @armelmahunan851 4 роки тому

    Thank you so much. You save me

  • @philosophyandreligion
    @philosophyandreligion 2 роки тому

    Great tutorial!
    1 question. I’m new to the computer verse.
    Was that data sheet created in Excel?

    • @MattMacarty
      @MattMacarty  2 роки тому +1

      Thanks. The data used started as an Excel file but was converted into .csv from within Excel.

    • @philosophyandreligion
      @philosophyandreligion 2 роки тому

      @@MattMacarty “This file type is not supported. Valid options are: CSV, JSON”
      That’s the notification I keep getting - even after I converted the file to CSv format. Trust me, I tried all of the csv format and I keep getting the same disappointment.
      I don’t know what to do now. May there is a setting in excel..🤦🏾‍♂️

    • @MattMacarty
      @MattMacarty  2 роки тому

      @@philosophyandreligion Are you on a MAC? Try installing a simple text editor like sublime text or atom. Open the file with the text editor and then copy and paste the data over itself and save. Try the upload then.

  • @orleanralia3297
    @orleanralia3297 2 роки тому

    Thank you.

  • @pavitras6058
    @pavitras6058 2 роки тому

    Do u have video on how install n setup MySQL pls share me and I need it on 6.3ce workbench

    • @MattMacarty
      @MattMacarty  2 роки тому

      I have a document if you email me I will send it to you. Tell me if you are using MAC or Windows

  • @surgiokilla1011
    @surgiokilla1011 4 роки тому

    Great tutorial. Thanks!

  • @nutsaboutnuts927
    @nutsaboutnuts927 2 роки тому +1

    Hi, at about 11.30 in the video, if I try to update using the str-to-text function, I get an error message 1411 incorrect datetime value. The csv file I'm using looks just the same as the one in this demo video (the date format). Any idea what's going wrong? (me = complete newbie!) Thanks

    • @MattMacarty
      @MattMacarty  2 роки тому

      Really hard to diagnose remotely. Can you try to alter the table to see if that works?
      ALTER [table name] MODIFY [data column] date; if this works you can skip the str_to_date( ) since the data is now defined as a date.

    • @nutsaboutnuts927
      @nutsaboutnuts927 2 роки тому

      @@MattMacarty Thanks so much for replying. In fact what I did was to change the column header in the csv file, previously it was called 'date' so I changed it to something else and then the str-to-date worked. In the table it still has the Datatype as text though - is that right?

    • @MattMacarty
      @MattMacarty  2 роки тому

      @@nutsaboutnuts927 Yes. To change the data type you run the ALTER table command from my previous response.

  • @nanthacharee1114
    @nanthacharee1114 3 роки тому

    What is double and why we have insert the text 'double'? is it because we have to repeat above and why we are not giving char for other columns and only gave for 1st column

    • @MattMacarty
      @MattMacarty  3 роки тому

      Double is the data type specification. This is a general numeric type with decimals. There are other numeric types , but double is a pretty good choice for most numeric data that many have decimals.

  • @padmakarlohatkar343
    @padmakarlohatkar343 2 роки тому

    thanks matt..

  • @joseraphaelmarquez8189
    @joseraphaelmarquez8189 2 роки тому

    Hello! I just want to ask if it is possible to hide the unwanted database or can I just create new file/project to makd it look more organized? Thank you in advance!! 😊

    • @MattMacarty
      @MattMacarty  2 роки тому

      The Workbench is really sort of a development environment for interacting with your databases. I don't think you can hid what you dont want to see unless you just close the schema pane. There are other tools you can try like Tables Plus that may do more of what you are looking for

  • @devconnie
    @devconnie Рік тому

    Hi Matt, tks for the great video. However, how to download the data file and upload

    • @MattMacarty
      @MattMacarty  Рік тому

      Here is a link to all the MySQL files: github.com/mjmacarty/mysql

  • @aparise1
    @aparise1 3 роки тому

    Great video! Is it possible to import more than 1000 rows with the wizard? Does creating the DB manually allow for more?

    • @MattMacarty
      @MattMacarty  3 роки тому +1

      Thanks. Yes you can import much larger files it just may be a little slow. The limit on output can also be changed to allow more or less results to display in your result set.

  • @mehdighomshe2346
    @mehdighomshe2346 4 роки тому

    thank you for your video

  • @tiagoaicapital
    @tiagoaicapital 2 роки тому

    Hi Matt, how could we upload csv files using an sql script to upload instead of doing need manually?

    • @MattMacarty
      @MattMacarty  2 роки тому +1

      This tends to be problematic due to security settings in MySQL. You are looking for LOAD DATA INFILE [filename]. Here's a link to the documentation: dev.mysql.com/doc/refman/8.0/en/load-data.html

    • @tiagoaicapital
      @tiagoaicapital 2 роки тому

      @@MattMacarty Thank you for the feedback

  • @partabparmar5537
    @partabparmar5537 3 роки тому

    thank you

  • @brisikog
    @brisikog 3 роки тому +1

    i am facing this problem while importing data
    unhandled exception :list index out of range
    and data is not importing
    please help me with this if u can???

    • @MattMacarty
      @MattMacarty  3 роки тому

      It sounds like the data you are trying to import may have to be cleaned. Probably some kind of invalid data. Try opening the file with a text editor. Usually Workbench will tell you what line in the data the problem happens at.

    • @cesarl.c.847
      @cesarl.c.847 3 роки тому

      Hi Bhuvan, after view great video, to review LoaderDataPlus tool. This tool import flat files and export to MYSQL, MARIADB sintax and other DMBS, also parsing and detect data type.

    • @brisikog
      @brisikog 3 роки тому

      Thanks both of you there was some problem with the data ....I solved it... thanks again

  • @jonlbs7
    @jonlbs7 3 роки тому

    When trying to update the date I got the following: 12:37:14 UPDATE amazon_csv SET t_date = str_to_date(t_date, "%m/%d/%Y") Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column. I'm having more problems with the date than you can possibly imagine.

    • @MattMacarty
      @MattMacarty  3 роки тому

      Ok, yes the date can be a pain. If this don't absolutely need it to be a date type you can probably just leave as a text. My guess is the dates are in a different format then you have specified. With your str to date function.

  • @samratkundu2799
    @samratkundu2799 Рік тому

    What should I do with the large data having more than 20K rows with messy/NULL values..?
    I may not know if the data type has really maintained to the entire row or not (and not possible to check entire dataset manually).. It's getting very tough to import the data successfully to MySQL table.
    The Import Data Wizard is really slow in this task. Is there any other way to this more efficiently whithout loosing anything ?
    please let me know..
    I'm unable to complete my portfolio projects 😥

    • @MattMacarty
      @MattMacarty  Рік тому

      You can try the import as a generic data type like text. Workbench is very slow with larger datasets. You may wan to try something like TablePlus

  • @LalitSoni-s2f
    @LalitSoni-s2f 4 місяці тому

    sir what if we use d/m/y date format instead of m/d/y ..will it work ?

    • @MattMacarty
      @MattMacarty  4 місяці тому

      The goal should be to get dates into ISO format for sorting. Yes you can use %d/%m/%Y to import European format

  • @pratyushsinha374
    @pratyushsinha374 3 роки тому

    Thank you so much!

  • @AjayKumar-id7mb
    @AjayKumar-id7mb 3 роки тому

    Thanks man

  • @roinelovitroc
    @roinelovitroc 4 роки тому

    Very helpfull! Great tutorial.

  • @khong6460
    @khong6460 3 роки тому

    A nice and clear intro to SQL workbench - MANY THANKS
    A qq, do I need to 'drop' the table every time when I wish to run the code before moving on to the next part? I never used the 'drop' trick, so workbench just returned a red cross with table already exists? TA !

    • @MattMacarty
      @MattMacarty  3 роки тому

      Hi no you don't need to drop table unless you want to start over.

    • @khong6460
      @khong6460 3 роки тому

      @@MattMacarty thanks for replying. I tried to re-run the whole program after inserting data into the table i created in part 1, but SQL workbench can't run that saying the table is already exist ? Cheers

    • @MattMacarty
      @MattMacarty  3 роки тому

      @@khong6460 OK, just skip the line where you CREATE TABLE. You can run one line at a time in the Workbench editor, or just comment the CREATE line out.

  • @45_dzikrimufidtsaqif33
    @45_dzikrimufidtsaqif33 Рік тому

    Let me ask, how do we know the latest data that appears from the data that we have imported without importing it again, I mean if we change the data then the new table will also be replaced automatically, how can we do that sir? thank you Sir

    • @MattMacarty
      @MattMacarty  Рік тому

      You can either manually import or write a script in something like Python to automate this.

  • @azimshikalgar69
    @azimshikalgar69 2 роки тому

    Hello,
    How to install DVD rental database in MySQL as it's in postgreSQL

    • @MattMacarty
      @MattMacarty  2 роки тому

      It's probably not directly compatible. Even though most of the query language is the same, these two products diverge in database implementation. I would do a search to see if someone has created a MySQL version. I am not familiar with that databse, but it sounds suspiciously similar to Sakila in MySQL

  • @granand
    @granand 3 роки тому

    Thank you Matt. Great tutorial and help. Please may I know where is this database stored which we are creating in the localhost. Can we change that location to external drive? 2. How to load .bak datasets, I have downloaded?

    • @MattMacarty
      @MattMacarty  3 роки тому

      In Windows you can find your database files here:
      C:\ProgramData\MySQL\MySQL Server 8.0\Data
      The programdata folder is hidden by default so go to file explorer and open This PC, then click the view tab at the top and check the Hidden items check box on the right of the ribbon

  • @ic_nivad7767
    @ic_nivad7767 Рік тому

    Hi Matt, thanks for the video! I have a question: why did my import (9 MB .csv) take so long to finish? 30 minutes passed, and it is still going. Would you happen to have any comments on this? Thanks for the time.

    • @MattMacarty
      @MattMacarty  Рік тому +1

      Workbench can be pretty slow importing data. There could be a problem with the data too. I would install TablePlus and try the import there. TablePlus is a client that can handle large imports much more quickly, and if there is a problem with data you will see that very quickly.

    • @ic_nivad7767
      @ic_nivad7767 Рік тому

      thank you for your time @@MattMacarty

  • @diazjubairy1729
    @diazjubairy1729 4 роки тому +1

    could you make tutorial about how to make ER Diagram from excel files to mysql worbench ?

  • @laughlive6840
    @laughlive6840 3 роки тому

    I can't able to get the data in the table after following all the procedures and executing the query , would you please tell me the solution for that and why that happens?

    • @MattMacarty
      @MattMacarty  3 роки тому

      This usually means there is a problem with either the data itself, or the way you have defined your table in Workbench. You might visually inspect the data in a text editor to see if there are any special characters. You could try importing into a new table and let Workbench determine the data types as an alternative.

  • @КамиллаГарифуллина-р4ю

    Thank you a lot, it's the best tutorial! However, I've faced the problem: 0 records imported. Please, can u say me how to fix it?

    • @MattMacarty
      @MattMacarty  3 роки тому +1

      This usually means there's a error in the data type you are trying to import. Try importing the data into a new table and then modify the definitions as needed.

  • @vinaybora617
    @vinaybora617 2 роки тому

    Awesome!! Dude