How to Update an XML File in a Database
- 1). Log in to your server through a terminal. This can either be a terminal emulator, or the PuTTY program for Windows. Type "ssh [your username]@[your server IP address]" then press "Enter" to log in. Enter your password when prompted to do so.
- 2). Log in to your database. For the popular database MySQL, you do this by typing "mysql -u [your database username] -p" then pressing "Enter." Enter your MySQL user password when prompted.
- 3). Type "use [database name]" using the name of the database you're seeking to update, then press "Enter."
- 4). Type "UPDATE [desired table name] SET [file field] =[address to new XML file] WHERE [index]=[identifier];" followed by "Enter" to update the file. Specify the table name within the database you are seeking to update, the server path to your updated XML file, the database field your XML filed is stored under, the index field you use to identify the rows in your database and the index identifier that specifies which row contains the XML file in question.
- 5). Type "quit" followed by "Enter" to exit the database program, then "exit" followed by "Enter" to log out of your server.
Source...