Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reload Mysql Server with PHP

Status
Not open for further replies.

DeepBlerg

Technical User
Jan 13, 2001
224
AU
hi all,

i am just wondering, if there is any way of reloading MySQL server with php script. i am logging on as root and have all permissions.

thanx for your time.
 
If they're on the same server just use shell() or exec().

If they're on separate servers you can do the same using rsh calls if they're available to you. Not aware of any direct way to do it through the PHP->MySQL connection.
 
Take a look at the mysqldump function in mysql.

*cLFlaVA
----------------------------
A polar bear walks into a bar and says, "Can I have a ... beer?"
The bartender asks, "What's with the big pause?
 
If you mean reloading the GRANT tables:

There is also all different kind of admin commands that can just be sent as a SQL string. Therefore, you might not want to connect to the server as root unless it is from the local system. A certain risk is taken when the superuser can connect from anywhere.
Alternatively create a reload user who has only reload privileges, but no shutdown, delete privs. That would curtail any excessive rights and possible abuse.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top