PDA

View Full Version : [Linux] Easy update command trinity



Wise
21-10-13, 02:12 AM
Here's a few super easy command's that puts all the sql updates in correct order in a file which you can execute and it will run all the updates.

Steps :

1-> Go to your sql updates/world folder
2-> Enter command: ls -1 > ../update
3-> Enter command: sed 's/^/mysql -pYOURROOTMYSQLPASSWORD world < /' -i ../update
4-> Enter command: chmod 700 ../update
5-> Enter command: mv ../update .
6-> Enter command: ./update

Tadaaaa. All sql command executed in the right order.

PS: you can trow this all in a .sh file for ease.
PS: This example only works for world updates. replace world in the sql statement with the database you need.
Make sure your also in the correct dbase folder.

Asbonia
21-10-13, 02:16 AM
Basic Linux :p