您使用的 MySQL 用户权限非常重要,可以防止您被黑客入侵。您应该遵循最低权限访问系统。
要在 PHPMyAdmin 中添加用户: 1) 以 root 身份登录 2) 转到“权限”选项卡 3) 单击“添加新用户”。
PHPMyAdmin 将 MySQL 权限分组为数据、结构和管理。
应禁用 Web 应用程序的“管理”权限,只有 root 应具有此访问权限。除非应用程序允许查询堆叠,否则在 SQL 注入漏洞利用中不能使用任何“管理”权限。(大多数不允许这样做!)
在安装 Web 应用程序期间,需要“结构”权限来构建数据库,但是在 Web 应用程序运行期间几乎不需要这些权限,因此可以将其关闭。
The "Data" section is tricky. The "FILE" privileges is the most dangerous privilege you could give a web application. The reason why is because it allows a hacker to use a SQL Injection vulnerability to read and write files on your server. "FILE" access is the only privilege which could give an attacker Remote Code Execution (RCE), and must ALWAYS be disabled.
Last but not least, Apache Friends XAMPP is terrible software. Known vulnerabilities exist and have gone unpatched for nearly a year. I recommenced using Ubuntu's LAMP install, it is both easy to use and secure.