How to Install Percona on CentOS7

Hello dear readers,

I’ve been checking the MySQL server options and new features which show that far from dying as many predicted when it fell under Oracle, it has evolved to something awesome.

In this post, I will use Percona for reasons I’d like to keep undisclosed. So let’s get started.

The easiest way to get up and running with Percona is to rely on the YUM repositories.

# yum install http://www.percona.com/downloads/percona-release/redhat/0.1-4/percona-release-0.1-4.noarch.rpm

This will install the Percona repository on your system so that you can then install the actual server and additional tools.

# yum install Percona-Server-server-57

This installs the server software, but doesn’t start the service. You need to manually start it for the first time.

# systemctl start mysql

After you get Percona MySQL running, you need to update your root password.

# cat /var/log/mysqld.log | grep generated
2018-03-24T15:54:37.006018Z 1 [Note] A temporary password is generated for root@localhost: Mr9nwsjduw=j

Use that password to login on your database and set your own:

mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('Your#Pass');

You’re all set! Grab your SQL Database Client of choice and start managing your Percona server!

Advertisements

SSH Connection Manager in Linux – Perl Auto Connector

Hello everyone,

Recently I found an awesome piece of software that can save you tons of time if you connect to several hosts through SSH from Linux.

In Windows, there are several choices like Putty CM (dead) or SuperPutty, which let you store connection data and connect to a host simply by double-clicking on the connection name later.

In Linux, the Perl Auto Connector (PAC) does this and does it very well.

It’s developed for Debian based distros, but you can find it the RPM package as well in their project page: https://sourceforge.net/projects/pacmanager/

Just go over to the “Files” tab and suit yourself.

You may run into a couple issues after installing, since it relies in some included libraries that must be removed  prior to being able to use it

After you install the RPM package, run the following

sudo find /opt/pac/ -name "Vte.so*" -exec rm {} +
sudo yum -y install perl-Gnome2-Vte

That will force the program to rely on global libraries instead of embedded libraries.

Enjoy!

 

Oracle Learning Library and Massive Open Online Courses – Free as in beer!

Hello everyone,

This is a very short post regarding Oracle Online Training for Free… Yes, as in beer!

There’s a new training mode for Oracle enthusiasts. It covers from Java to the Oracle Cloud, including everything in between, including Database, SQL, PL/SQL and other topics. There are permanent courses and MOOCs.

Massive Open Online Course (a.k.a. MOOC) are time limited events that  include videos, materials and everything you need to practice the lesson objectives.

Simply go to: http://www.oracle.com/goto/oll

This will take you to the Oracle Learning Library landing page.

From there you will find Learning Paths, Permanent Courses and Limited-Time Events. Each section has a wide range of options, topics and modules that can help grow your professional skills. The best of all? For Free!

In my case, my main interest circles around Oracle Databases, SQL, PL/SQL, Apex and DevOps.

Choose your destiny and grow!

MySQL 5.7 on Fedora 25/26 from scratch

Hello fellow DBAs, tech enthusiasts and anybody who wants to know how to install MySQL 5.7 on Fedora 25/26 or any equivalent RPM based Linux distro.

 

Installing the Repo

Let’s start by installing the dummy package that gives us access to the MySQL Community repo using the following command:

# dnf -y install https://dev.mysql.com/get/mysql57-community-release-fc25-9.noarch.rpm

Installing the server

After that’s done, just install the server as follows

# dnf -y install mysql-community-server

Once the server is installed and you have the service running, you may have noticed that no root password was given to the installation process, meaning that you’ll have to reset it manually. This is a good exercise on how to recover (or reset) ROOT passwords that have been forgotten.

Changing the ROOT password

Follow the steps described bellow:

  1. Stop the server
  2. Set the –skip-grant-tables option
  3. Start the server
  4. Update the password directly on the mysql.user table
  5. Flush the privileges.
  6. Stop the server
  7. Unset the option
  8. Start the server
  9. (Optional) Set the password if you are asked for it.
# systemctl set-environment MYSQLD_OPTS="--skip-grant-tables"

# systemctl start mysqld

$ mysql -u root

mysql> UPDATE mysql.user SET authentication_string = PASSWORD('MyNewPassword') WHERE user = 'root' and host = 'localhost';

mysql> FLUSH PRIVILEGES;

# systemctl stop mysqld

# systemctl unset-environment MYSQLD_OPTS

# systemctl start mysqld

Now you can login with your new ROOT password!

If you get this error

ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

Execute this command

set password = PASSWORD('MyNewPassword');

Enjoy!

The Path to become a DevOps (Part 1)

Hello dear readers!

I’m very excited about this post series. I decided a few days ago that I will take the DevOps path. I have always liked the optimization, automation and operations area. The DBA (with some SysAdmin) path seemed the right choice until now.

Nowadays, everything is moving to the Cloud and Big Data. Thus, the DevOps door is there open waiting for you to step in, if you have what it takes.

I think I have it and my journey starts here.

First step was, of course, reading and start taking online courses.

My academy of choice was Linux Academy. I already had taken courses on some other topics on Udacity, Udemy and EDX. Nevertheless, the most comprehensive DevOps path I could find was the one in Linux Academy. Additionally, for a small monthly fee (30 USD per month), I get a bunch of virtual servers to play with.

If this wasn’t interestingly enough, they (Linux Academy) also offer a challenge-based site to practice your skills: Cloud Assessments.

This is an amazing platform that lets you practice for real with AWS for a certain period of time while you complete assessments that help you build up skills and try real-life scenarios to provide solutions as an AWS DevOps engineer.

What I’m saying here is that if you want to learn, if you want to grow professionally and advance to the Cloud, you can do it for free, or at least for a small monthly amount.

Below you’ll find a list of sites and online sources that offer knowledge and training.

So, from here on, basically choose your flavor and head straight for the sky.

For me, learning is what life is all about. So make it happen. Go after what you want and reach higher levels by acquiring new and updated knowledge.