creating user in mysql using java

前端 未结 4 1211
情书的邮戳
情书的邮戳 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:53

    put.execute(MySQL query) 
    

    in here you can execute only MySQL query but

    grant all privileges on mydb.* to 'admin'@'localhost' identified by 'pass';
    

    Not a MySQL query it is just a command for MySQL.

提交回复
热议问题