How do I remove a MySQL database?

前端 未结 7 2047
傲寒
傲寒 2021-01-29 22:35

You may notice from my last question that a problem caused some more problems, Reading MySQL manuals in MySQL monitor?

My database is now unusable partly due to

7条回答
  •  伪装坚强ぢ
    2021-01-29 22:47

    If you are using an SQL script when you are creating your database and have any users created by your script, you need to drop them too. Lastly you need to flush the users; i.e., force MySQL to read the user's privileges again.

    -- DELETE ALL RECIPE
    
    drop schema ;
    -- Same as `drop database `
    
    drop user ;
    -- You may need to add a hostname e.g `drop user bob@localhost`
    
    FLUSH PRIVILEGES;
    

    Good luck!

提交回复
热议问题