简体   繁体   English

用密码替换mysql用户

[英]wamp mysql user with password

hey guys i have installed wamp server with mysql and i have one user root without password. 嗨,我已经用mysql安装了wamp服务器,我有一个没有密码的root用户。 but now i want create one another user with password. 但是现在我想用密码创建另一个用户。 when i was create user with password and check his connection with mysql_connect() its give me error like this 当我用密码创建用户并检查他与mysql_connect()的连接时,它给我这样的错误

 Access denied for user 'Dest'@'localhost' (using password: YES)

But password is realy correct. 但是密码是正确的。 what can i do? 我能做什么? i was delete this user and create other user but i have the same problem. 我删除了该用户并创建了其他用户,但是我遇到了同样的问题。 if anyone knows that problem please help me 如果有人知道这个问题,请帮助我

Hey Guys Problem Has Been Solved. 大家好问题已解决。 Problem was that when i was create user i was choose % this local and global hosts but for wamp global accses for sql base is disabled with defoult and i think poblem is that. 问题是,当我创建用户时,我选择了%此本地和全局主机,但是对于wap来说,sql base的全局acces被禁用,我认为问题就在于此。 when i create user with Localhost its worked fine. 当我使用Localhost创建用户时,它的工作正常。 thanks all for help :) 谢谢大家的帮助:)

If you try to connect as root and get the above error, it means that you do not have a row in the user table with a User column value of 'root' and that mysqld cannot resolve the host name for your client: 如果您尝试以root用户身份连接并出现上述错误,则意味着您在用户表中没有用户列值为'root'的行,并且mysqld无法为您的客户端解析主机名:

from the mysql prompt execute this command to be able to change any password FLUSH PRIVILEGES; 从mysql提示符处执行此命令,以能够更改任何密码FLUSH PRIVILEGES;

for more information https://help.ubuntu.com/community/MysqlPasswordReset 有关更多信息, 请参见https://help.ubuntu.com/community/MysqlPasswordReset

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM