在phpmyadmin里的sql框里打 grant select on *.* to root@localhost identified by "yourpassword"; grant select on *.* to root@'%' identified by "yourpassword"开始-运行-c:\mysql\bin\mysql.exe 后打入也行。格式:grant select on 数据库.* to 用户名@登录主机 identified by "密码"
不好意思,我的phpmyadmin是web版本的,无需安装,只是把它解压到IIS的目录下即可,它可以用浏览器访问,但进入以后我想在里面设置密码,一直不成功!提示如下:必须设定 $cfg['PmaAbsoluteUri'] 在设定档案内!设定档内有关设定 (root登入及没有密码) 与预设的 MySQL 权限户口相同。 MySQL 伺服器在这预设的设定运行的话会很容易被入侵,您应更改有关设定去防止安全漏洞。
grant select on *.* to root@localhost identified by "yourpassword";
grant select on *.* to root@'%' identified by "yourpassword"开始-运行-c:\mysql\bin\mysql.exe 后打入也行。格式:grant select on 数据库.* to 用户名@登录主机 identified by "密码"
给phpmyadmin做“密码配置”(也就是让它和mysql相连)是在config.php第80,81行
$cfg['Servers'][$i]['user'] = '您的数据库用户名'; // MySQL user
$cfg['Servers'][$i]['password'] = '密码';
2.$cfg['Servers'][$i]['password'] = '' (设置用户密码)但把$cfg['Servers'][$i]['auth_type'] = 'config'中的config改成http却不行,所以我就没改了,所以虽然我的phpmyadmin可以打开,但登录时还是不需要输入密码,同时中文版也很难打开,所以我只好用英文版了:)
$cfg['Servers'][$i]['auth_type'] = 'config'就一切OK, 算了, 太烦了,不搞了,这应该说只是登录我的phpmyadmin没有密码而已,而其他诸如访问mysql,test以及以后我将建的那些数据库都是要密码的吧?