Recently in Technical: Web Server Category
Sometimes you would like a quick and easy way to export all MySQL databases from the command line to avoid all of the hassles of web interfaces and an array of tools.
From the command line you can just run this:
mysqldump —user=mysqlusername —password=yourpassword —all-databases > filename.sql
Easy.
Remember - this with everything on this site is for reference only and I’m not responsible for you etc…
Just a shot note as this is something that I’ve been asked about recently. Hopefully the distinction I make below will help a beginner somewhere!
To restart apache from the command line, the command is (typically):
sudo /etc/init.d/apache2 restart
There are some errors that you may get whilst running various commands. Below are a list of commands, associated errors and their explanations;
/etc/init.d/apache2 restart
You may get an error for not using ‘sudo’
sudo /etc/init.d/apache2 restart
Not in sudoers file
Your user must have appropriate sudo priveledges
apache2 restart
or sudo apache2 restart
Usage: apache2 [-D name] [-d directory] [-f file]
[-C “directive”] [-c “directive”]
…etc…
Typically this error will occur if you have navigated to the /etc/init.d directory. *This will not work!*
apache2 -k restart
apache2: bad user name ${APACHERUNUSER}
You don’t need to put the -k in. Also see above if you are trying this having navigated to the /etc/init.d directory
We had this problem, so I thought I would publish the solution as I could not find it anywhere else on the internet!
If you receive a 500 Error with Error Code 0x800700c1 for zendenabler.php:
- Go to IIS
- Handler Mappings
- Find the .php Zend entry
- Change the file from x64 to the ‘non’ x64 version 5 .Ok
- Restart IIS
That will now work!
Incidentally if you also have WSUS enabled and get server error 500.16, you may need to disable a particular compression file which will then allow 32bit apps to run.
Hope this helps!