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:…
Category: MySQL
MariaDB Galera Cluster on Ubuntu 20
MariaDB Galera Cluster is a synchronous multi-master cluster for MariaDB with support for XtraDB/InnoDB storage engines. It has the following top features. It provides active-active multi-master topology You can read and write to any cluster node It has an automatic node joining Automatic membership control, failed nodes drop from the…
Install MariaDB 10.3 on CentOS
Step 1: Add MariaDB Yum Repository Create a new repo file /etc/yum.repos.d/mariadb.repo and add the below code changing the base url according to the operating system version and architecture. # vi /etc/yum.repos.d/mariadb.repo [mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.3/centos73-amd64/ gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1 Step 2 – Install MariaDB Server Let’s use the…
Delete/Purging mysql-bin (binlog) files safely
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…
MySQL: Show Users, Privileges and Passwords
Show all MySQL users: mysql> SELECT user FROM mysql.user; List only unique user names: mysql> SELECT DISTINCT user FROM mysql.user; Show MySQL users and hosts they are allowed to connect from: mysql> SELECT user,host FROM mysql.user; Show MySQL users, their passwords and hosts: mysql> SELECT user,host,password FROM mysql.user; in MySQL…
Installing MySQL on Debian
Step 1 – Prerequisites Login to your Debian 9 system using shell access. For remote systems connect with SSH. Windows users can use Putty or other alternatives applications for SSH connection. ssh root@debian9 Run below commands to upgrade the current packages to the latest version. sudo apt update sudo apt…
Install Mysql Client on Debian 10 (Buster)
Debian stopped packaging mysql-client as of buster. You can use apt-get install default-mysql-client Which will install mariadb-client-10.3. MariaDB is a fork of MySQL. The client can still be started with the command mysql.
Install Mydumper Myloader on Centos 7
If you want to execute logical backups using an alternative to mysqldump that works with parallel threads giving faster execution times mydumper is the correct tool. wget https://github.com/maxbube/mydumper/releases/download/v0.9.5/mydumper-0.9.5-2.el7.x86_64.rpm In order to use mydumper and myloader you can use the following sample commands: For dumping/exporting database: mydumper -u <username> -p <password>…
Percona Mysql Service Force Stop
Service mysql stop is being ignored. How to fix? Try mysqladmin -u root -p shutdown Alternatively, In case you have started /etc/init.d/mysql bootstrap-pxc So in this case you should stop bootstrapped node using /etc/init.d/mysql bootstrap-stop
Exporting Percona Database
Exporting percona database is however a bit tricky way to make funcitonal. The usual- mysqldump -u root -p [database] > database.sql will stuck and shoot you many error. All you need is the add an extended parameters to execute the dump, and here it is: mysqldump -u root -p [database]…