mysql

Log in to MySQL from terminal mysql -u root -p Run MySQL commands CREATE database_name; CREATE USER 'some_user'@'localhost' IDENTIFIED WITH mysql_native_password BY ‘your_password’; GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, TRIGGER, REFERENCES ON database_name.* TO 'some_user'@'localhost'; Edit above privileges as needed  ...

Read More
cli

Enable mod_rewrite Enable any Apache module using the a2enmod command. Command below on your Ubuntu server: $ sudo a2enmod rewrite In case the module is already enabled on your server, you will get an alert message. Restart Apache once you make any change to its configuration. Type the command below on a terminal window: $ sudo systemctl restart apache2 Server is now ready to accept rewrite rules.     ...

Read More

Create a python script $ more memReport.py #!/usr/bin/python import subprocess import re # Get process info ps = subprocess.Popen(['ps', '-caxm', '-orss,comm'], stdout=subprocess.PIPE).communicate()[0].decode() vm = subprocess.Popen(['vm_stat'], stdout=subprocess.PIPE).communicate()[0].decode() # Iterate processes processLines = ps.split('\n') sep = re.compile('[\s]+') rssTotal = 0 # kB for row in range(1,len(processLines)): rowText = processLines[row].strip() rowElements = sep.split(rowText) try: rss = float(rowElements[0]) * 1024 except: rss = 0 # ignore...

Read More