How to connect Java Project with MySQL Workbench

Поділитися
Вставка
  • Опубліковано 14 гру 2024

КОМЕНТАРІ • 82

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

    YOU ARE THE BEST! I only needed to add the JAR file to my project, and BOOM it worked! you saved my life and thanks to you I'll have a 100 for sure!

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

    finally got it working after this amazing tutorial. THANK YOU.

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

    YOU ARE THE ONLY ONE WHOSE CODE WORK!!

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

    No need of databaseName in connection sir

  • @sukritishukla2695
    @sukritishukla2695 4 роки тому +5

    This was really helpful. Thank you so much :)

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

    I am getting a error and exception saying you have an error in your sql sytax ; and check the manual that correspondence to your sql version and etc..

  • @ashishagarwal4311
    @ashishagarwal4311 4 роки тому +2

    I am getting this error: Exception in thread "main" java.sql.SQLException: Access denied for user ''@'localhost' (using password: YES). can u help me with this ??

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

      Same problem do u know how to change it

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

      most probably you guys are using the wrong credentials

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

      @@elisadevid5660 , If it is done then its fine. If not pls , check prepare statement and username(I had made mistake in both these parameters). Also u can refer to link: www.mysqltutorial.org/connecting-to-mysql-using-jdbc-driver/

  • @shrutibhadane4313
    @shrutibhadane4313 5 років тому +1

    it worked for me. N I am very much thankful to you.

    • @codec4805
      @codec4805  5 років тому

      Shruti Bhadane Glad i could help.

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

    God Gifted child you are 😍

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

    it is very helpful, thanks so muchhhh

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

    doen't work
    gives the error
    Wed Jul 01 19:12:16 CDT 2020 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
    Exception in thread "main" com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'autoreconnect=true&usessl=false'
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:403)
    at com.mysql.jdbc.Util.getInstance(Util.java:386)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:944)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3933)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3869)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:864)
    at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1707)
    at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1217)
    at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2189)
    at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2220)
    at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2015)
    at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:768)
    at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:403)
    at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:385)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:323)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at Strato.main(Strato.java:15)

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

    how did it work without you changing "String databaseName" ?

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

    thanks bro u really helped so greateful

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

    Exception in thread "main" java.lang.Error: Unresolved compilation problem:
    This was the result. What might be the problem?

  • @clopes87
    @clopes87 5 років тому

    I can not drag the jar file into the main project, it only allows me to drop it in 'source packages' and after that there is not add to build path option

  • @danam8413
    @danam8413 6 років тому +1

    Hello,i tried your tutorial but it sidn't work for me.i'm using netbeans and my OS is windows 10,i tried many ways to get connected to the mysql database but it never worked.am i missing something?

  • @iosiffurtuna8031
    @iosiffurtuna8031 5 років тому +2

    Thank you so much sir! It worked like a charm :)

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

    Hello sir, I didn't get build path option then what I do?

  • @proud671
    @proud671 5 років тому +2

    man you made my day....thank you so much :)

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

    Exception in thread "main" java.sql.SQLException: Unknown initial character set index '255' received from server. Initial client character set can be forced via the 'characterEncoding' property.
    i got this exception plz help to resolve this.

  • @paarichandrasekaran8365
    @paarichandrasekaran8365 4 роки тому +2

    database name in java is still blank :)

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

    Thank u bro it's useful

  • @yashkaliapiano
    @yashkaliapiano 5 років тому

    great video very helpful

    • @codec4805
      @codec4805  5 років тому

      cheers! Stay tuned for more videos related to Java, Node and React

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

    thanks for the tutorial.
    i have this result.
    do you know how i can fix it?
    "The server time zone value 'ora solare Europa occidentale' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support."

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

    in the new mysql jar file connecto there is 2 executable jar file . if the -bin.jar didnt work for someone try the other.

  • @rupertacuesta
    @rupertacuesta 5 років тому

    Once connected, how would I edit it, I'm using java netbeans how would I edit it through there? For example to add a name etc

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

    May you create video about connection using oop

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

    It worked for me thank you 😊👍

  • @manasatk2311
    @manasatk2311 5 років тому +1

    I'm getting communication link failure for this. What to do sir😐

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

    Mine still doesn't connect: I get Error in the CheckConnection. Any other possible reason? Thanks.

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

    Love Your Videos Man I am very thankful and grateful to xD...

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

    Thanks for the help❤️🙏

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

    No forward engineer option just reverse engineer

  • @manasatk2311
    @manasatk2311 5 років тому

    Thank you it works,, but how to implement connection Java file to other jsp file,,, how to extend this. Please help in this.

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

    does this work for NetBeans?

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

    Very helpful, thank you

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

    Thank you so much!

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

    Data truncation: Data too long for column 'Password' at row 1 , Any ideas ?

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

    thanks, you'r amazing ;)
    just a question, how you got row number 17? ("com.mysql.jdbc.Driver") ??

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

      "com.mysql.jdbc.Driver" is name of the Java Database Connectivity (JDBC) Driver Class. In order to tell the DriverManager which Driver to make connection with, you need to specify a class name. Thats what we are doing here.

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

    Thanks 🙌🙏

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

    sir how to change the port number? Can you suggest me??

  • @deepakhk9439
    @deepakhk9439 5 років тому

    super

  • @muhammadsaim8110
    @muhammadsaim8110 5 років тому

    I wish I could give you more likes

  • @pantadeusz293
    @pantadeusz293 5 років тому +1

    Thank you very, very much bro!

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

    can you please upload the code??!!

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

    Thanks

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

    I am getting this type of ERROR- Client does not support authentication protocol requested by server; consider upgrading MySQL client

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

    the field "String database" is not used

  • @27SharathK
    @27SharathK 5 років тому

    code is working... thank you .. !

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

    Thanks Bro

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

    I am not getting build path option

  • @deepakhk9439
    @deepakhk9439 5 років тому

    but sir jar files not downloods

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

    hi , thank you for the video.. i followed you , getting output like this. no error are there.
    Kindly assist me.


    The user to connect as


    The password to use when connecting


    The name of the class that the driver should use for creating socket connections to the server. This class must implement the interface 'com.mysql.jdbc.SocketFactory' and have public no-args constructor.

  • @MoreYaseen
    @MoreYaseen 5 років тому

    how do i put the jar in intellij???

    • @hamzakhan8393
      @hamzakhan8393 5 років тому

      you can drag and drop

    • @MoreYaseen
      @MoreYaseen 5 років тому +1

      @@hamzakhan8393 it didnt work that way, i looked up a few other ways and found out that you can choose to download it into a library.

  • @mr.hassaan7785
    @mr.hassaan7785 5 років тому

    When i click connect to database my workbench crashes. Whats the solution

    • @okenyigabriel2575
      @okenyigabriel2575 5 років тому

      The same thing happened to me when using a distro of Linux (Fedora 29), when I upgraded, and downloaded MySQL workbench everything was fine.

    • @mr.hassaan7785
      @mr.hassaan7785 5 років тому +1

      @@okenyigabriel2575 mine ia solved but i have done it manually

    • @bianca-dariamihai6402
      @bianca-dariamihai6402 3 роки тому

      i had to install the atest version of mysql in order for it to be compatible with workbench

  • @12sdhungel
    @12sdhungel 5 років тому

    finally thanks dude

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

    i dont remeber my mysql workbench password ..help

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

      Follow this link: dev.mysql.com/doc/mysql-windows-excerpt/5.7/en/resetting-permissions-windows.html

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

  • @tiendatluong296
    @tiendatluong296 6 років тому

    is work ty

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

    пасибо братик

  • @james-metapod-harden8317
    @james-metapod-harden8317 6 років тому +1

    eclipse is not workbench..... rename your video

    • @SurajYadav-yd2cu
      @SurajYadav-yd2cu 4 роки тому

      workbench is not related to eclipse it is a tool to work in mysql

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

    what a waste of time