Login to mysql $ mysql -u root -p Show users mysql> SELECT User FROM mysql.user;...
Read MoreLogin to mysql $ mysql -u root -p Show users mysql> SELECT User FROM mysql.user;...
Read More$ sudo apt install zip unzip
$ zip -r filename.zip folder...
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 MoreStep 1 — Installing Certbot sudo apt install certbot python3-certbot-apache Step 2 — Obtaining an SSL Certificate sudo certbot --apache -d domainname ...
Read MoreEnable 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 MoreCreate 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 MoreWarning in ./libraries/sql.lib.php#601 count(): Parameter must be an array or an object that implements Countable || (count($analyzed_sql_results[‘select_expr’] == 1) that’s missing close bracket ‘)’ before operation with 1. So changed it to || (count($analyzed_sql_results[‘select_expr’]) == 1 remove last close bracket ‘)’ at this line like this, ...
Read Morels -la | awk '{print $9}'...
Read More