【发布时间】:2015-03-10 12:30:50
【问题描述】:
我用phpmyadmin来调整用户的权限。
我删除了用户“root”的所有访问权限。现在我看不到桌子了。
我尝试在另一个用户下登录,但它不允许我。
此时我有什么选择?
第一步。
//Stop mysql server
zend
opt 6 zendDBi
opt 7 Stop ZendDBi
第 2 步。
//Start mysql server
cd /usr/local/mysql/bin
mysqld_safe --skip-grant-tables
mysql FLUSH PRIVILEGES;
在我这样做之后,我得到了这么长的一段文字:
/usr/local/mysql-5.1.59-i5os-power-64bit/bin/mysql Ver 14.14 Distrib 5.1.59, for ibm-i5os (power) using readline 5.1
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Usage: /usr/local/mysql-5.1.59-i5os-power-64bit/bin/mysql [OPTIONS] [database]
-?, --help Display this help and exit.
.............
刷新后,我尝试重新连接 mysql 服务器,但出现此错误:
mysql -u root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
【问题讨论】:
-
您看不到表格,但如果您能够以“root”身份登录,那么您可以像 REVOKE 一样授予权限。
-
mysql> 使用授予选项将 . 上的所有权限授予 'root'@'%';错误 1045 (28000): 用户 'root'@'localhost' 的访问被拒绝(使用密码:否)
-
Viswanath Polaki 没有解决问题
标签: mysql