Skip to main content

How to remove the database and user mysql



Having abandoned the convenient panel to manage the server, I was faced with the need to remove the databases and users of mysql. After all, before something was done through the socket, and - manually.



So, to remove the database and the user of this database, you must first connect to the mysql server:

  # mysql -uroot -pMyPassword 

Then delete the base:

  mysql> DROP DATABASE basename; 

And delete user:


  mysql> DROP USER 'username' @ 'localhost'; 

Replace basename with the name of the database to be deleted.

Replace username with the name of the user to be deleted. localhost , in some cases, can be replaced by the server's domain name, ip address.



How do you rate the article?
Звёзд: 1Звёзд: 2Звёзд: 3Звёзд: 4Звёзд: 5 ( 6 ratings, average: 3.50 out of 5)
Loading...

Add a comment

Your email will not be published.