Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
MySQL 8 for Big Data

You're reading from  MySQL 8 for Big Data

Product type Book
Published in Oct 2017
Publisher Packt
ISBN-13 9781788397186
Pages 296 pages
Edition 1st Edition
Languages
Concepts
Authors (4):
Shabbir Challawala Shabbir Challawala
Profile icon Shabbir Challawala
Chintan Mehta Chintan Mehta
Profile icon Chintan Mehta
Kandarp Patel Kandarp Patel
Profile icon Kandarp Patel
Jaydip Lakhatariya Jaydip Lakhatariya
Profile icon Jaydip Lakhatariya
View More author details

Table of Contents (17) Chapters

Title Page
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface
1. Introduction to Big Data and MySQL 8 2. Data Query Techniques in MySQL 8 3. Indexing your data for High-Performing Queries 4. Using Memcached with MySQL 8 5. Partitioning High Volume Data 6. Replication for building highly available solutions 7. MySQL 8 Best Practices 8. NoSQL API for Integrating with Big Data Solutions 9. Case study: Part I - Apache Sqoop for exchanging data between MySQL and Hadoop 10. Case study: Part II - Real time event processing using MySQL applier

Installing MySQL 8


Let's first see from where to download MySQL 8 and a basic understanding of package structures to choose which one is appropriate. We start by obtaining MySQL 8 and will then quickly glance through installation and verification.

Obtaining MySQL 8

Download the RPM package of the MySQL Community Server from its download page (https://dev.mysql.com/downloads/mysql/8.0.html). There are various variants available based on the operating system and its architecture version. It comes with different packages that can be described by the package name. The following syntax is followed by the package name:

packageName-version-distribution-archType.rpm

Package Name: Name of the package, like myql-community-server,mysql-community-client,mysql-community-libs

Version: Describes the version-particular package

Distribution: This says the package is intended for which Linux distribution based on its abbreviation

Abbreviation

Linux distribution

el6, el7

Red Hat Enterprise Linux/Oracle Linux/CentOS 6, 7

fc24, fc25

Fedora 24 or 25

sles12

SUSE Linux Enterprise Server 12

solaris11

Oracle Solaris 11

 

Arch Type: Describes the processor type for which the package was built, like x86_64, i686, and so on

MySQL 8 installation

Once you have the RPM packages, just install it using the following command. This will place the required files and folder under the system directories:

rpm -vih <package-name>.rpm

For the standard installation, it requires only mysql-community-common,mysql-community-libs,mysql-community-client, and mysql-community-server packages. Look at the following screenshot for the installation process:

After the successful installation, just check its version to validate if it's installed properly and can be accessible:

The next step is to reset the temporary password during post-installation. MySQL will restrict you to use the database before changing this temporary password. A temporary password will be generated by MySQL and available in its log file. To retrieve a temporary password, you need to open the /var/log/mysql/mysqld.log file and search for the temporary password keyword.

Copy this and try to connect to MySQL with the following command:

As shown in the preceding screenshot, you will land on a MySQL command prompt, where you can execute the following query to reset the password:

ALTER USER 'root'@'localhost' IDENTIFIED BY '<NEW_PASSWORD>';

MySQL service commands

Let's look at a few MySQL basic commands:

  • To start the MySQL service, perform the following command:
service mysqld start
  • To stop the MySQL service, perform the following command:
service mysqld stop
  • To check the status of MySQL service whether it is running or not, perform the following command:

 

service mysqld status
You have been reading a chapter from
MySQL 8 for Big Data
Published in: Oct 2017 Publisher: Packt ISBN-13: 9781788397186
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}