如何删除wordpress
[root@vultr ~]# mysql -u root -p
Enter password:
//登陆数据库
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 5.5.60-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> SELECT DISTINCT CONCAT('User: ''',user,'''@''',host,''';') AS query FROM mysql.user;//查看用户
+------------------------------------+
| query |
+------------------------------------+
| User: 'root'@'127.0.0.1'; |
| User: 'root'@'::1'; |
| User: ''@'localhost'; |
| User: 'root'@'localhost'; |
| User: 'wordpressuser'@'localhost'; |
| User: 'billli'@'locolhost'; |
| User: ''@'vultr.guest'; |
| User: 'root'@'vultr.guest'; |
+------------------------------------+
8 rows in set (0.01 sec)
MariaDB [(none)]> drop user wordpressuser@localhost
-> ;//删除对应的数据库用户
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> SELECT DISTINCT CONCAT('User: ''',user,'''@''',host,''';') AS query FROM mysql.user;
+-----------------------------+
| query |
+-----------------------------+
| User: 'root'@'127.0.0.1'; |
| User: 'root'@'::1'; |
| User: ''@'localhost'; |
| User: 'root'@'localhost'; |
| User: 'billli'@'locolhost'; |
| User: ''@'vultr.guest'; |
| User: 'root'@'vultr.guest'; |
+-----------------------------+
7 rows in set (0.00 sec)
MariaDB [(none)]> drop database wordpress//删除数据库
-> ;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> show databases
-> ;//查看是否删除成功
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
+--------------------+
3 rows in set (0.00 sec)
MariaDB [(none)]> exit
Bye
[root@vultr ~]# cd /var/www/html
[root@vultr html]# ls
info.php wordpress
[root@vultr html]# rm -rf wordpress/
//删除wordpress目录下所有的文件
[root@vultr html]# ls
info.php
[root@vultr html]# reboot