How to reset MySQL Root Password in Linux Rumi, June 6, 2014 First, Let’s stop the mysql service, In Red Hat’s family (Red Hat Enterprise, Fedora, CentOS) the Mysql Daemon is called ‘mysqld‘, but in Debianlike Ubuntu based distributions and OpenSuse its called ‘mysql‘. I’ll be using the debian based naming sudo service mysql stop OR sudo /etc/init.d/mysql stop Now, we’ll start the server in safe mode and skip grant tables so that it wont ask for the password we had lost when we try to login sudo mysqld_safe –skip-grant-tables you should see something like this 111026 11:05:46 mysqld_safe Logging to syslog. 111026 11:05:46 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql Now open a new terminal window and run the mysql console using the main mysql database named ‘mysql‘ using the root user mysql –user=root mysql Then we’ll reset the password from the mysql’s users table, flush privieges, then exit the mysql console UPDATE user SET password=PASSWORD('new-password') WHERE user='root'; flush privileges; exit; Start again the mysql daemon sudo service mysql stop sudo service mysql start That’s All Related Configurations (Linux) MySQL
Apache htaccess and htpasswd May 23, 2009March 29, 2017 In order to protect a site or a directory using Apache htaccess and htpasswd files follow the steps- 1. Creating .htaccess file and putting the following code- AuthUserFile /your/abosolute/path/to/this/file/.htpasswd AuthGroupFile /dev/null AuthName “Protected files” AuthType Basic <Limit GET> require valid-user </Limit> 2. Create a .htpasswd in the same directory as… Read More
Install Apache Tomcat 8.5 on CentOS 7.3 December 10, 2017 Prerequisites Server with CentOS 7 – 64bit 2 GB or more RAM (Recommended) Root Privileges on the server Step 1 – Install Java (JRE and JDK) In this step, we will install the Java JRE and JDK from the CentOS repository. We will install Java 1.8.11 on the server with… Read More
Setup a Site to Site IPsec VPN With Strongswan and PreShared Key Authentication March 25, 2019March 25, 2019 Today we will setup a Site to Site ipsec VPN with Strongswan, which will be configured with PreShared Key Authentication. After our tunnels are established, we will be able to reach the private ips over the vpn tunnels. Get the Dependencies: Update your repository indexes and install strongswan: $ apt… Read More