Linux

Recover (Change) Linux Mysql Root Password

Recover (Change) Linux Mysql Root Password

Fadıl

Multiple passwords can sometimes be difficult to keep in mind. One of these is when we forget the MySql Linux root password. If you have forgotten the MySQL root password on Linux, you don’t have to worry about that, you can recover it by following the steps below;

First, restart MySQL by giving the following command.

mysqld --skip-grant-tables

Then connect to MySQL with MySQL utility without using the password.

mysql> update mysql.user set Password=Password(‘new password’) where User=’root’;
mysql> flush privileges;

Finally, restart MySQL again normally without --skip-grant-tables.

HOW TO INSTALL CENTOS 7 ZABBIX 3.4 PROXY

HOW TO INSTALL CENTOS 7 ZABBIX 3.4 PROXY

Fadıl

Today, we will set up a proxy for the Zabbix server that I have installed in version 3.4 and enable it to communicate.

First things you need to do;

1- IP configuration

2- Turning off selinux and firewall settings

3-C hange hostname (optional, easy to manage large structures)

4- Passing updates.

If the server is ready after the steps mentioned above;

We enter the Zabbix official repo and download the required rpm package.

How to Use Bash Script for MySQL Error Log Rotation

How to Use Bash Script for MySQL Error Log Rotation

Fadıl

We will share with you a script that we can use to find the solution and the solution that we receive in the Mysql database.

Below is the simple script for monitoring MySQL error logs. You can set the cron jobs as per your need(eg. week, daily, hourly)

#!/bin/bash
SERNAME="techsoftcenter"
SERPUBIP="10.0.0.0"
SERVER="ip-10.0.0.0"
 
MAIL_LIST="[email protected]"
Error_log_location=/var/log
Alert_log_path=/opt/work/dblogs
 
sudo egrep -i 'Error' $Error_log_location/mysqld.log |sort -u > $Alert_log_path/mysqld_ALERTLOG.txt
 
if [ $? -eq 0 ]; then
sudo cat $Error_log_location/mysqld.log > $Alert_log_path/mysqld_archived_`date +%Y-%m-%d-%H:%M:%S`.log
 
if [ $? -eq 0 ]; then
 
sudo cat /dev/null > $Error_log_location/mysqld.log
 
else
 
echo "failed to empty file"
 
fi
 
else
 
echo "something went wrong after log file backup"
 
fi
 
cd /tmp/
cd /opt/work/dblogs/
 
FILE_TYPE="*.txt"
FILE_TYPE1="*.log"
 
find ${FILE_TYPE} -type f -mtime +1 -delete
find ${FILE_TYPE1} -type f -mtime +1 -delete
 
if [ -s "$Alert_log_path/mysqld_ALERTLOG.txt" ] ; then
cat $Alert_log_path/mysqld_ALERTLOG.txt | mutt -s "URGENT -ERROR in Mysql Alert Log File for $SERNAME ($SERPUBIP) at `date` " -- ${MAIL_LIST}
fi

Hope it helped.

How to Install Android Studio on Linux  [4 Method]

How to Install Android Studio on Linux [4 Method]

Fadıl

With Android Studio, the official IDE of Android, you can develop high-quality Android apps for Android devices. Android Studio hosts the tools required for Android developers.

How to Install Android Studio?

Before you try one of the following installation methods, you need to install java on your computer. You can use the links below to install OpenJDK or Oracle JAVA.

[1. Method] Installation Method on Android Studio’s Site

  1. Download Android Studio for Android version from Android Studio ‘s own site.
  2. Remove the downloaded zip file to a suitable location for your applications (eg / usr / local / or / opt / for shared users ) for your user profile.
  3. To start Android Studio, open the terminal and enter the android-studio /bin/directory and run studio.sh.
  4. A window will appear asking you to import your previous Android Studio settings. Click OK.
  5. The Android Studio Setup Wizard will help guide you through the installation.

Tip: If you want Android Studio to appear in the list of your apps, select Tools> Create> Desktop Launcher from the menu bar of Android Studio.

How To Install JAVA (OpenJDK) 11 On Linux

How To Install JAVA (OpenJDK) 11 On Linux

Fadıl

You have multiple options to develop a Java application on Linux (Ubuntu or Debian).

Use OpenJDK (Open Java Development Kit), an open and free implementation of the standard Java platform, or use Oracle Java SE JDK from Oracle. Oracle JDK is recommended by the IDE developer (Google), especially for those who prefer the new integrated development environment Android Studio. Other than that, you can choose between these two JDKs as you use standard Java libraries while developing an Android app.