Category Archives: Howto Tutorials (EN)

Howto Tutorials English contribution. Howto’s and tutorials, technical workaround, DevOps Code for Professionals.

Set MySQL root password to blank

How to set a blank MySQL root password?

In the terminal, first open MySQL with the root account.

$ sudo mysql

For some configurations, the following command may need to be executed, with root password entry.

$ mysql -u root -p

If you need to set an empty password for the root user, this can be created with this command.

MariaDB> SET PASSWORD FOR 'root'@'localhost' = '';

If the password of an existing user is to be set to blank, the following ALTER USER command can be used.

MariaDB> ALTER USER 'user'@'localhost' IDENTIFIED BY '';

The following command creates a new user user and will set a blank password.

MariaDB> CREATE USER 'user'@'localhost' IDENTIFIED BY '';

Alternatively, mysqladmin can be used to empty the root password.

$ sudo mysqladmin -u root -pcurrent_password password ''

Linux command tail -f on Windows

Linux tail belongs to the GNU Core Utilities (Coreutils). It is a collection of basic command line commands that are included with most Linux OS.

First and foremost, tail is used to output the end of a (text) file, or to restrict the output of a Linux command to a certain area. The tail command is related to the head command and the cat and less commands. These Linux commands all serve one purpose of outputting the contents of text files.

PowerShell Get-Content -Wait -Tail

As used on Linux tail with the -f (–follow) option to follow the update of a log file in real time, but on Windows there is no tail command, for this Windows has the PowerShell command Get-Content, with the option – Wait -Tail a log file can be followed in real time, new lines that are written to the log file can also be displayed continuously under Windows.

PS C:\> Get-Content C:\inetpub\logs\LogFiles\W3SVC1\20230227.log -Wait -Tail 10

This example tracks the IIS log file in real time and outputs it to Windows 10 or Windows 11 PowerShell.

  The update is stopped when you click in the PowerShell window, the update stays in mark mode, the update is continued with hit Escape.