A collection of notes related to hosting
Last active
January 30, 2017 09:14
-
-
Save anselmdk/3fe36c5fb7c4f59b5d14 to your computer and use it in GitHub Desktop.
Hosting Cheat Sheet
sudo service mysql restart
sudo service mysqld restart
sudo /etc/init.d/mysql restart
mysqladmin -u root password NEWPASSWORD
or:
mysqladmin -u root -p'oldpassword' password newpass
http://www.cyberciti.biz/faq/how-do-i-access-mysql-server-from-the-shell-prompt-command-line/
#Syntax examples
mysql -u {mysql-user} -p {mysql-password} -h {mysql-server}
mysql -u vivek -h mysql10.nixcraft.in -p
show databases;
USE MYDB;
SHOW TABLES;
NOTE: Apache should NOT own files it shouldn't have write access to
Check what user apaches is running as (expecting www-data):
ps -ef | grep apache
assetsneeds to be writeable by the web user
Xeera suggests 755 (with 7 for the owner - apache)
Yes files should be 644 and directories 755 by default.
php -r 'echo "Hello\n";'
php --ini This should say "loaded confiuration file: xxx". If no config file is loaded, you might need to create one.
...or this:
php -i | grep 'Configuration File'
from http://stackoverflow.com/questions/2750580/how-to-find-the-php-ini-file-used-by-the-command-line
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment