java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO)

后端 未结 5 1657
挽巷
挽巷 2021-01-21 14:15

I\'m having troubles with my project , it involves JDBC and Mysql connection .

When I do the following :

private Statement m_         


        
5条回答
  •  梦谈多话
    2021-01-21 15:06

    I had the same problem. You need to set a password for the user. Go to the mysql console .

    $ mysqladmin -u root password myFirstpassword
    

    Then change your password in the java program

提交回复
热议问题