How to Reset Root Password in MySQL 8.0

MySQL

If you forget the MySQL root password on MySQL 8.0 server, you can follow the instruction here to reset the root user password. First, stop the MySQL server if it is already running

Now start MySQL with –skip-grant-tables option

MySQL will run in the background. Connect to MySQL with

To reset MySQL […]

Read More…

Warning: Use of undefined constant OAUTH_REQENGINE_CURL

Ubuntu PHP OAuth

On an Ubuntu server (Ubuntu 20.04.2 LTS) when running a PHP script, I get the following error.

On checking phpinfo, I get

curl is missing in “Request engine support”. This is because the default php-oauth package does not support curl. To fix, uninstall php-oauth and install oauth package using pecl. Uninstall pcel

[…]

Read More…

configure: error: Couldn’t find pcre.h, try installing the libpcre

Linux

When installing PHP OAuth, I get the following error

To fix, install libpcre3-dev

See Errors […]

Read More…

CyberPanel FTP not working on Ubuntu Server

On CyberPanel server, FTP was not working. I checked the server with “netstat -lntp” command. No service was listening on port 21. Started pure-ftpd with command

To start pure-ftpd on boot, run

Now FTP service started listening on port 21, but login to the FTP server failed with an error “Login authentication failed”. […]

Read More…

How to find Amazon S3 bucket size

To see the disk usage of an Amazon S3 bucket, do the following 1) Click on the bucket name 2) Click on Metrics 3) On Next Page, you will see S3 bucket disk usage. In this case, the bucket size is 39.3 MB. To find disk usage using awscli, run

See Amazon S3 […]

Read More…

How to cut lines separated by multiple spaces?

cut is a Linux command that can be used to cut a line of text with a specific delimiter. I want to cut lines separated by multiple spaces like Since the fields are separated by multiple spaces, I can’t just use cut -d’ ‘ command. What you can do is combine multiple spaces into one […]

Read More…

How to fix WordPress 404 error in Webuzo

Webuzo

Webuzo hosting control panel has the option for selecting web servers Apache or Nginx. On a server using Nginx, after uploading the WordPress site and restoring the database, the website home page worked. When I clicked on any web page, I get a 404 Page not found error. To fix this, you need to add […]

Read More…

How to install and use rdesktop

rdesktop is an open-source client for connecting to windows using Windows Remote Desktop Services. To install rdesktop on CentOS/Fedora run

To install rdesktop on Ubuntu/Debian servers, run

To connect a server with rdesktop

[…]

Read More…

sshpass

sshpass is used to non interactively log in to remote SSH server and execute commands. It can use a password from a file, environment variable, or from a command-line argument. To install sshpass on RHEL/CentOS, run

On Debian/Ubuntu

Example

Take MySQL backup on a remote server

Command-line options for sshpass are […]

Read More…