|
发表于 2003-9-4 00:39:38
|
显示全部楼层
要连接的MySQL服务器机器的名称不能用localhost(修改/etc/sysconfig/network);
同时MySQL的mysql数据库user表中必须有host字段为%或允许的客户机名字。
[code:1]
#mysql -u root
>use mysql;
>select * from user;
>insert into user values ("机器名","用户名", password("密码"), "Y","Y","Y","Y","Y","Y","Y","Y","Y","Y","Y","Y","Y","Y");
>quit;
[/code:1]
说明:机器名可以为localhost,%,或具体的机器名。其中%代表所有机器可以使用给定的用户名和密码登陆。14个"Y"代表所有权限都设置为允许。
默认的root用户只可以从本机登陆的。 |
|