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 h开发者_如何学JAVAere 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.
i am not know how my connection user goes changes i open the connection everywhere in my appliction through 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.
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.
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?
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.
精彩评论