Browsing: Tech

How to reset/change MariaDB root password?

ERROR 1698 (28000): Access denied for user 'root'@'localhost'

… comes the message.

Server version: 10.1.35-MariaDB-1

So, you did not mess with your server. You are fairly certain others have not messed with it. So what could have happened? Well, count me in. I have all the security updates enabled. Only have auto-updated WP sites, secured MySQL, key-based SSH, all the fluff.

Yet, the password for root (only) broke. Probably an update.
Let’s fix it.

1. First option. Was ineffective for me.

sudo service mariadb stop
sudo mysqld_safe --skip-grant-tables --skip-networking &
mysql -u root
use mysql;
update user set password=PASSWORD("password") where User='root';
flush privileges;

2. Second option. Worked for me.

sudo mysql -u root
# Optional, check if you even have a root user
SELECT User,Host FROM mysql.user;
DROP USER 'root'@'localhost';
CREATE USER 'root'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;

I am not to held responsible if your computer/server blows up.
Replace “password” obviously in the commands.

{ Add a Comment }

Guide/tutorial: How to buy/build a super fast pendrive?!

Recently I had to reinstall a few machines and I also needed a Hackintosh boot drive. Turns out, pendrives are still slow as heck.
Of course I knew there are a few faster models, so I went to Amazon and then searched for reviews.

Turns out, thanks to the way pendrives work, they will always be slow – no matter the model or brand.
So, how could I make a faster pendrive? I knew that I can use a big hard drive as a boot disk, but it’s tedious, and you cannot format it FAT32 either (as 32GB is the max limit for that.)

These are the products I used:

  • ¬†https://www.transcend-info.com/Products/No-760
    ^ The enclosure. It has a screwdriver, screws, cable, and a stylish case which you can use anywhere, it looks neat.
    There is a smaller enclosure called “CM42” but I went with the CM80. There is almost no price difference, but you can put any length M2 into the CM80.
  • https://www.transcend-info.com/Products/No-642
    ^ The SSD inside. Any M2 works (2242, 2260, 2280 factors).
    I used a 32GB MLC model, because I wanted Windows to be able to use FAT32 on it. Thanks to this size, I can connect it to any legacy or embedded device and it just works. Of course, you can use any size.

That’s it. Once you open the box, you just follow the enclosure’s manual and insert the SSD. It will be a 5 minutes exercise, and it just werks.
Finally, a fast pendrive that is easy to carry and can be handled rough. Yay!

{ Add a Comment }