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

Поділитися
Вставка
  • Опубліковано 25 лис 2024
  • #mysql #workbench #database
    alphabench.com...
    Please SUBSCRIBE:
    www.youtube.co...
    Get up and running quickly with MySQL Workbench how to import csv files. How to create tables directly from Excel files. Video tutorial demonstrating database creation, table definition and importing data in MySQL
    Link to Data file(data.csv): github.com/mjm...
    #mysql #workbench #database

КОМЕНТАРІ • 379

  • @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!

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

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

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

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

  • @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!!

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

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

  • @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

  • @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

  • @lebom8076
    @lebom8076 2 місяці тому

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

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

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

  • @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!

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

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

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

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

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

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

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

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

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

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

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

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

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

    This is exactly what I needed thanks a million

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

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

  • @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.

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

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

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

    Thank you for making this easy!

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

    Thaaanks! One of the best tutorials I've seen

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

      Thanks very much. Glad it helped.

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

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

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

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

  • @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!

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

    Incredibly helpful video, thank you.

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

    You are a life saver Matt. Thanks so much

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

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

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

    Thanks man! Really good tutorial

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

    thank you so much you are just amazing, perfect explanation

  • @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:/

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

    Life Saver tutorial!!!

  • @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.

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

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

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

    thanks alot! i forgot about that lightning thing 😂

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

    very helpful in importing an excel file. thankyou

  • @sagetimmy6310
    @sagetimmy6310 8 місяців тому

    Well explained ❤

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

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

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

    Tks Matt. Appreciate it.

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

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

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

    Nice this is so clear

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

    Greate Job Sir

  • @grannah2050
    @grannah2050 11 місяців тому

    Very helpful, thank you

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

    So helpful.

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

    Great tutorial. Thanks a lot Matt!!

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

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

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

    Thank you, it helps a lot

  • @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.

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

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

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

    great tutorial, thanks!

  • @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?

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

    thank you so much sir

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

    Thank you so much for this!

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

    Wonderful

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

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

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

    tq sooooo much

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

    Thank you!

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

    Thanks....

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

    Very helpful

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

    Great tutorial. Thanks!

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

    Thank you sir

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

    Thank you for this

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

    Really so helpful ❤️

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

    Thank you.

  • @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!

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

    Amazing it helped alott💓

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

    Thanks man

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

    Thank you so much!

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

    thanks matt..

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

    Thank you so much. You save me

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

    thank you for your video

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

    Very helpfull! Great tutorial.

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

    Awesome!! Dude

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

    thank you

  • @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

  • @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.

  • @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.

  • @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

  • @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

  • @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

  • @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

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

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

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

    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  2 роки тому

      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.

  • @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.

  • @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

  • @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

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

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

    • @MattMacarty
      @MattMacarty  2 роки тому +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.

  • @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

  • @КамиллаГарифуллина-р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.

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

    I am not seeing action output on my Mysql workbench. Any solution?

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

      Sounds like either the panel has been hidden or you are not connected to the server.

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

    i have an error and i ve been trying to solve for hours please help me when i want to import i get an error called ascii codec cant decode byte 0xef in position 0: ordinaş not in range (128). and i use mysql workbench 8.0.24

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

      If you are importing data into a pre-designed table you might have defined the first column as a tiny int which will only accept values up to 128. You can alter your table or try to import the data into a new table. You may also have are some characters in your data that you can't see. Try opening the data with a plain text editor and see if you can find it.

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

      @@MattMacarty i solved thankssss ❤️❤️

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

    The navigator (schema) was not found to me ! What is problem

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

      Try the refresh button (if I understand you correctly)

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

    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  2 роки тому

      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.

  • @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.

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

    what if I followed all your steps but I ended up in "0 records imported" but I saw my records in "configure import settings"

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

      This usually means MySQL is having trouble with some of the data you are trying to import. It could be a data type mismatch, i.e. some string data in a column that you defined as numerical, or there could be some special characters that MySQL can't process. Try importing the data into a new table and let MySQL determine the data types

  • @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.

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

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

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

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