Showing posts with label Database. Show all posts
Showing posts with label Database. Show all posts

Monday, February 11, 2019

Restore MySQL Enterprise Backup File

Restore MySQL Enterprise Backup File

1. Shutdown MySQL server

mysqladmin -u root -p shutdown

2. Restore MySQL Backup

./mysqlbackup --defaults-file=/etc/MySQL/my.cnf --datadir=/var/lib/MySQL --backup-image=/srv/db_backup/my.mbi --backup-dir=/srv/db_backup/restore-tmp copy-back-and-apply-log --force --uncompress

3. Update file permission

chown -R mysql:mysql /var/lib/MySQL

4. Start MySQL

service start MySQL

5. Check your MySQL data to ensure that it's been successfully restored.

That's all folks!  5 steps only.  I've restored 16GB of compressed my.mbi backup file in less than half an hour.
Fyi, I referred to https://dev.mysql.com/doc/mysql-enterprise-backup/4.1/en/mysqlbackup.restore.html for this.

Wednesday, September 5, 2018

Install PgAdmin4 on Centos 7

Install PgAdmin4 on Centos7

PgAdmin4 is GUI Tool to manage PostgreSQL database.  I have a problem installing the latest PgAdmin4 which is v3.2 in Windows 10 on my HP EliteBook x360 so I made the decision to install it on my VMware Virtualised Centos 7 server.
This is what I did to install PgAdmin4 on Centos 7:

1. Get the yum repository installed on my server

  • Install the yum repo

    sudo rpm -ivh pgdg-centos96-9.6-3.noarch.rpm

  • Install PgAdmin4

    sudo yum -y install pgadmin4

  • Configure PgAdmin4

    cd /usr/pgadmin4/bin/
    su

    ./pgadmin4-web-setup.sh

    NOTE: Configuring authentication for SERVER mode.
    Enter the email address and password to use for the initial pgAdmin user account: Email address: edyzairani@gmail.com
    Password:
    Retype password:
    pgAdmin 4 - Application Initialisation
    ======================================
    We can now configure the Apache Web server for you. This will create the pgAdmin4 conf file under /etc/httpd/conf.d/. Do you wish to continue?
    1) Yes
    2) No
    #? 1
    pgAdmin4 Apache config file is created as /etc/httpd/conf.d/pgadmin4.conf
    Apache web server is not running. We can start the web server for you to finish pgAdmin4 installation. Would you like to continue?
    1) Yes
    2) No
    #? 1

    Apache successfully started. You can now start using pgAdmin4 in web mode

2. Install PgAdmin4 Desktop Gnome

    sudo yum -y install pgadmin4-desktop-gnome

That's all folks.
Fyi, I referred to https://people.planetpostgresql.org/devrim/index.php?/archives/96-Installing-pgAdmin4-3.X-on-RHEL-CentOS-7-and-Fedora-27.html for this.

Install MySQL 8.0 on Centos 7

Steps to install MySQL 8.0 Community Edition in Centos 7 1. Enable MySQL 8.0 Repository sudo yum localinstall https://dev.mysql.com...