Perfect way to reset MySQL Root Password on Debian/Ubuntu Rumi, August 9, 2016 If you forgot your MySQL root password, you can reset it by following these steps. 1. Stop the MySQL service. service mysql stop 2. Start MySQL without password and permission checks. mysqld_safe --skip-grant-tables & 3. Press [ENTER] again if your output is halted. 4. Connect to MySQL. mysql -u root mysql 5. Run following commands to set a new password for root user. Substitute NEW_PASSWORD with your new password. UPDATE user SET password=PASSWORD('NEW_PASSWORD') WHERE user='root'; FLUSH PRIVILEGES; 6. Restart the MySQL service. service mysql restart Related MySQL
Install Percona XtraDB Cluster for MySQL 5.7 on Debian 8 February 18, 2019 First of all, why we choose three nodes and not only two? In any cluster, the number of nodes should be odd, so in the case of disconnection of a node, we assume that the highest group of servers has the fresh data, and should be replicated to the down node… Read More
Install MySQL 5.7 on Ubuntu 20.04 January 9, 2024 Prerequisites Linux servers running Ubuntu 20.04 root privileges Step 1 – Add MySQL APT repository in Ubuntu Ubuntu already comes with the default MySQL package repositories. In order to add or install the latest repositories, we are going to install package repositories . Download the repository using the below command:… Read More
Delete/Purging mysql-bin (binlog) files safely January 7, 2021 The file mysql-bin.index keeps a list of all binary logs mysqld has generated and auto-rotated. The mechanisms for cleaning out the binlogs in conjunction with mysql-bin.index are: PURGE BINARY LOGS TO ‘binlogname’; PURGE BINARY LOGS BEFORE ‘datetimestamp’; These will clear all binary logs before the binlog or timestamp you just… Read More