[英]Why My Mysql command does not work on server whenever everything gone fine in my system?
When my system try to run a command on development machine they are work fine here but on server i have a little issue. 当我的系统尝试在开发机上运行命令时,它们在这里工作正常,但是在服务器上我有一个小问题。
I have admin user on server who have everything permission for doing. 我在服务器上拥有管理员用户,该用户具有执行所有操作的权限。 but in a function wherever i pass same queries they try to open the function using admin @ localhost wherever i nowhere use it and have on server. 但是在我传递相同查询的函数中,无论我在哪里使用它并在服务器上使用,都尝试使用admin @ localhost打开该函数。
i am not know how my connection user goes changes i open the connection everywhere in my appliction through root @ localhost. 我不知道我的连接用户如何变化,我通过root @ localhost在我的应用程序中的任何地方打开连接。 in certain function why my user name goes changed. 在某些功能中,为什么我的用户名更改了。
i thing i have them on localhost but not on sever but why it's happed whenever i not want to open them through other user. 我的东西我有他们在本地主机上,但没有在服务器上,但是为什么每当我不想通过其他用户打开它们时,它都会被隐藏。
can anyone explain without change anything in connectionstring how Mysql itself change the username root to admin to open a connection wherever i open the connection through root. 任何人都可以解释而无需更改connectionstring中的任何内容Mysql本身如何将用户名root更改为admin以在我通过root打开连接的任何地方打开连接。
i have same issue many time before but never found what's going wrong. 我在很多时间之前都遇到过同样的问题,但从未发现出了什么问题。
are anyone know how mysql change the username and how i can stop them. 有谁知道mysql如何更改用户名以及如何阻止他们。
your question is hard to read/understand. 您的问题很难读懂。
But if im correct, your saying that the dbconnection username is changing from root -> admin, but your not sure how its happening .. could you clarify further? 但是,如果我说的没错,您的说法是dbconnection用户名从root-> admin更改,但是您不确定它是如何发生的..您能否进一步澄清?
At a guess, I would say that somewhere in your program you are using the same variable name and then trying to use that to connect to the database. 猜测一下,我想说的是,您在程序的某个位置使用了相同的变量名,然后尝试使用该变量名连接到数据库。
ie. 即。
//set db paramenters
$host = localhost;
$dbusername = root
$dbpassword = password
// *some code*
// somewhere you change the dbusername variable thinking its for something else
$dbusername = admin
// *some more code*
mysql_connect($host,$dbusername,$dbpassword);
Am i on the right path? 我在正确的道路上吗? Please clarify your question further if possible. 如果可能,请进一步澄清您的问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.