简体   繁体   English

每当我的系统一切正常后,为什么My Mysql命令在服务器上不起作用?

[英]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.

相关问题 为什么我的c Sharp命令提示符代码在服务器上不起作用,但在本地PC上却能正常工作 - Why is my c sharp command prompt code not working on my server but working fine on my local pc 为什么我的 C# API 在服务器上工作正常,但当我尝试从任何其他客户端计算机调用它时总是失败? - Why does my C# API work fine on the server but it always fails when I try to call it from any other client machine? 为什么我的System.Data.DataSet在ForEach中不起作用? (没有GetEnumerator) - Why does my System.Data.DataSet not work in a ForEach? (No GetEnumerator) 为什么我对 System.Threading.Timer 的使用不起作用? - Why does my use of System.Threading.Timer not work? 为什么我的异步命令调用单元测试不起作用? - Why my async command invocation unit test does not work? 为什么我的mysql中的count命令返回错误的值-1? - Why does my count command in mysql return wrong value -1? 为什么C#DirectoryServices无法与我的LDAP服务器一起使用? - Why does C# DirectoryServices not work with my LDAP server? 为什么SonarCloud显示一切正常? - Why does SonarCloud show that everything is fine? 为什么我的功能不起作用? - Why does my function not work? 为什么我的排序不起作用? - Why does my sorting not work?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM