creating user in mysql using java

前端 未结 4 1249
情书的邮戳
情书的邮戳 2021-01-28 10:55

In MySQL command line client after logging in as root, I typed:

connect mydb;
grant all privileges on mydb.* to \'admin\'@\'localhost\' identifi         


        
4条回答
  •  天命终不由人
    2021-01-28 11:49

    Try following

    put.execute("grant all privileges on mydb.* to 'john'@'localhost' identified by 'pass'"); 
    

    And also make sure you have ExtendedAnsiSQL flag to 1.

提交回复
热议问题