0

在 Ubuntu 12.0.4 LTS 上通过 apt-get 安装 Mysql 并弄乱它之后,我处于没有可以执行任何操作来授予权限或创建新用户的帐户的位置。

我只能通过

mysql --defaults-file=/etc/mysql/debian.cnf

select host,user ,select_priv, Create_user_priv from mysql.user;

返回下表:

+-----------+------------------+-------------+------------------+
| host      | user             | select_priv | Create_user_priv |
+-----------+------------------+-------------+------------------+
| localhost | apsc             | N           | N                |
| localhost | pma_GSn1wBscFLp0 | N           | N                |
| localhost | pp_sb_db         | N           | N                |
| localhost | debian-sys-maint | Y           | Y                |
| localhost | admin            | N           | N                |
| localhost | pma_FoXErUK90AbF | N           | N                |
+-----------+------------------+-------------+------------------+

如何创建具有所有权限的 root 用户?完全重置对我来说很好。

像下面这样的命令只返回access denied错误

GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION
4

0 回答 0