Manually Export MySQL Database

How do I manually export or "dump" a MySQL database from command line or SSH? You can dump a MySQL database to the current folder from an SSH session using the following command: mysqldump –no-create-db=true -uUSERNAME -pPASSWORD DATABASE > filename.sql So if your database name is "USER_MYDATABASE" and your database username is "USER_USER1" and the […]

Search For Specific Text In File

How can I find a specific text string in a file or multiple files from an SSH session? You can use the grep command to easily find text within files. From an SSH session, run the following command: grep -H -r "<Text-To-Find>" <search-location> Where <Text-To-Find> would be replaced with the text you want to search […]

Bulk Edit DNS Zone On cPanel

How do I bulk edit a DNS zone on cPanel? Changed nameserver name and need to update all the DNS zones on your cPanel server? Using the replace command from an SSH session will make it simple. Just use the following command: replace "<old-nameserver>" "<new-nameserver>" — /var/named/*.db Where <old-nameserver> is the hostname of the old […]