坚持每天记录技术日志
mysqlconnect/db server: Access denied for user
上一篇 /
下一篇 2012-06-25 16:02:05
/ 个人分类:Hammerora
[root@server hammerora-2.10]# ./bin/tclsh8.5
% package require mysqltcl
3.05
% mysqlconnect -host 10.1.40.82 -port 3306 -user root -password qwer1234
mysqlconnect/db
server: Access denied for user 'root'@'server' (using password: YES)
%
出现错误信息:mysqlconnect/db server: Access denied for user 'root'@'server' (using password: YES)
这是因为没有授权给root@server可以连接到mysql服务器
解决办法:登录mysql,执行以下命令
mysql> grant all on *.* to root@'test.example.com' identified by 'mysql';
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
其中第一条命令中by ‘mysql‘是你所使用mysql用户的密码
收藏
举报
TAG: