Install Percona XtraDB Cluster for MySQL 5.7 on Debian 8 Rumi, 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… Continue Reading
Error 2020: Got packet bigger than ‘max_allowed_packet’ bytes when dumping table `migrations` at row: 1 Rumi, April 26, 2018 You can add –max_allowed_packet=512M to your mysqldump command. Or add max_allowed_packet=512M to [mysqldump] section of your my.cnf Note: it will not work if it is not under the [mysqldump] section… Continue Reading
MySQL my.cnf tweak for faster importing large database Rumi, March 3, 2018 Few small hack will ease you importing large sized mysql dump in a bit faster process. The trick worked for me for a 70 GB dumped sql, can’t guarantee it’d work for you! Step-1 need to change the following: innodb_buffer_pool_size = 4G innodb_log_buffer_size = 256M innodb_log_file_size = 1G innodb_write_io_threads =… Continue Reading
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… Continue Reading
Reset a MySQL root password for Debian Rumi, July 14, 2016 Use the following steps to reset a MySQL root password by using the command line interface. Stop the MySQL service (Ubuntu and Debian) Run the following command: sudo /etc/init.d/mysql stop (CentOS, Fedora, and Red Hat Enterprise Linux) Run the following command: sudo /etc/init.d/mysqld stop Start MySQL without a password Run… Continue Reading
Reinstalling MySQL on CentOS/Redhat 6 Rumi, February 7, 2016 Some time we faces issues with MySQL installation on Linux machine. If we simply remove MySQL packages and re-install doesn’t fixes the issue, in that case old settings may still exists on server which again affects new install. In that case first uninstall MySQL completely from system and erase all… Continue Reading
MySQL Master-Master Replication Rumi, October 26, 2014October 26, 2014 This article is about setting up MySQL Master-Master database replication between two Cloud Servers. Master-Master data replication allows for replicated data, stored on multiple computers, to be updated by any authorized contributing member of the group. This allows for more open collaboration than Master-Slave replication where any needed changes identified… Continue Reading
MySQL Master-Master or Master-Slave Replication Error Fix Rumi, January 18, 2013 Scenario Master – Master replication MasterA is a client facing server MasterB is a warm standby server (read only) MasterB restarted abruptly and when instances were braught back up MasterA (it’s slave) was showing the following error: MasterA has the following error in show slave status: Last_IO_Errno: 1236 Last_IO_Error: Got… Continue Reading
MySQL Cheat Sheet Rumi, February 1, 2012 Selecting a database: mysql> USE database; Listing databases: mysql> SHOW DATABASES; Listing tables in a db: mysql> SHOW TABLES; Describing the format of a table: mysql> DESCRIBE table; Creating a database: mysql> CREATE DATABASE db_name; Creating a table: mysql> CREATE TABLE table_name (field1_name TYPE(SIZE), field2_name TYPE(SIZE)); Ex: mysql> CREATE TABLE… Continue Reading
Recover MySQL root Password Rumi, December 27, 2011 You can recover MySQL database server password with following five easy steps. Step # 1: Stop the MySQL server process. Step # 2: Start the MySQL (mysqld) server/daemon process with the –skip-grant-tables option so that it will not prompt for password. Step # 3: Connect to mysql server as the… Continue Reading