I build a small application using PHP/MySQL. After one year of development, I fell that I need to update MySQL tables structures.
I do that using (SELECT * INTO OUTFILE
) it is work in my local server but not in any user that host his application in hosting company that use some thing like cPanel ( or Control Panel that given by host company to let user manage his web page, emai开发者_如何学JAVAls,ftp account, database...etc).
That type of hosting is not giving full root access to any user cuz it is share same hardware with many other clients.
edit:
I forget to tell you that I need to do that using php script I made, to let ppl run it on their servers to make this automatically. there is no thing to do by user..... this script will do the following:
1) get a copy for all data in each table.
2) delete/Drop all tables.
3) create new tables with new structure.
4) import data again to that new labels.
Use phpMyAdmin, available from cPanel.
if it's working on your local machine then it is highly likeable that the user you are using to connect to the DB does not has all the privileges required.
You can use cron jobs for regularly exporting (dumping) your databases. Also use phpmyadmin like JohnD mentioned
精彩评论