PHPMYADMIN Root reset

The latest version of PHPMYADMIN won’t allow root to login without a password, and you can only login to the phpmyadmin user.

Here’s how you work around it.

 

 

 

 

sudo mysql -u root

 

CREATE USER 'set-new-user'@'localhost' IDENTIFIED BY 'set-your-password';

GRANT ALL PRIVILEGES ON *.* TO 'your-suername'@'localhost';

FLUSH PRIVILEGES;

exit

sudo service service mysql restart

If that fails, try this:

 
sudo mysql -u root
use mysql;
update user set plugin='' where User='root';
flush privileges;
\q

Use 1GB of Raspberry Pi RAM as a SWAP drive

If you have little use for the 2GB of RAM in a Raspberry Pi, then you could always use 1GB of it for a SWAP drive, this should improve performance for anyone running their Pi on a SD card.

If you want to use a SSD or USB Drive then checkout my easy as Pi tutorials here: https://the-bionic-cyclist.co.uk/category/raspberry-pi-tutorials/

As usual this is a quick and easy setup:
install ZRAM

sudo wget -O /usr/bin/zram.sh https://raw.githubusercontent.com/ric96/zram_rpi3/master/zram.sh

Make it executable.

sudo chmod +x /usr/bin/zram.sh

Edit this file to run on startup

sudo nano /etc/rc.local add line before exit 0 /usr/bin/zram.sh &

Source: (always check before installing from any source) https://github.com/ric96/zram_rpi3

HTOP – Real time feedback from your Raspberry Pi

 

 

 

 

 

What is HTOP? Simply put, it’s a real-time feedback system to let you see what your Raspberry Pi is doing, what applications are running, and how much processing power is being used as well as where your RAM is being accessed and by what.

 

 

 

 

 

 

sudo apt-get install htop

It’s tiny and installs in seconds.

After that run htop by typing….

htop

 

Simples 🙂

Install Nextcloud cloud server on a Raspberry Pi

Nextcloud is a personal cloud server, you’re not relying on Apple cloud or Google or Dropbox to hold and secure (laughable) your data. If you have a Raspberry Pi at home you can host your own cloud server. There are desktop apps for Windows and Macs and apps for almost ALL mobile operating systems too.

The most popular self-hosted file share and collaboration platform

I’ve gone for the personal route because I find the free cloud server really don’t offer enough storage space, and security is a joke for most of them. Plus with the SSL guide you can make sure your is as secure as possible.

Continue reading

Setup SSL on a Raspberry Pi in 2 minutes

UPDATE: Lets Encypt have an auto install bot and it’s a signed certificate, meaning no warning! https://letsencrypt.org/

This is the LetsEncrypt Method:
sudo apt-get install certbot python-certbot-apache -t stretch-backports
sudo certbot --apache
sudo certbot --apache certonly
Test the automated update process.
sudo certbot renew --dry-run


Continue reading

Raspberry Pi Ad Blocker

I remember seeing something about an advert blocker for the raspberry pi but I can’t find the original post, so some googling later and I found pi-hole.
https://pi-hole.net/
It took less than a minute and it kicks Ad Blocker Pro’s arse then beats it while it’s down. It’s amazing, not one single damn advert gets through, and those that do you can add to a black list.

So if like me you’re sick to death of adverts and you don’t mind spending a few quid getting a raspberry pi then this is a must.

Once complete, change the DNS server of the client (PC, phone, laptop, tablet or just about anything that uses your internet connection) to your rasperry Pi’s IP address.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

curl -sSL https://install.pi-hole.net | bash

change the pi-hole password:

pihole -a -p newpasswordhere

 

 

Run a Raspberry Pi on a SSD or a USB Drive of any kind.

Well… technically it won’t boot from a hard drive, it has to be the boot partition on the SD card, but that’s actually just a small script setting up the root partition of the SD card.

The raspberry Pi is brilliant and every iteration has made it better and faster, all except one thing, the SD card. It still requires an SD card to boot up and run, but now you can run Linux from an SSD!

What I will show you is how to copy the contents of this root partition to an external drive, be it a USB memory stick, USB hard drive or like I have, an external USB Solid state drive.

This is actually a VERY VERY easy thing to do and aside from copying the contents from one drive to another, very quick too.

So the first thing to do is attach the USB drive to the Pi. For easy install I’ve already partitioned and formatted the drive to linux EXT4, all I need to do is discover where it is in the file system.

Continue reading

Install Apache2 PHP and Mysql on a Raspberry Pi

How to install a webserver on Raspberry Pi 2 running Raspbian (wheezy)

Full list of edits and installs to get my webserver up and running without mySQL.

Make sure everything is up to date, this takes about 60 seconds:

Code: Select all

sudo apt-get update

Code: Select all

sudo apt-get upgrade

Continue reading