SlideShare una empresa de Scribd logo
1 de 48
Descargar para leer sin conexión
MySQL for IBM i

                        Function Junction
Mike Pavlak
Solutions Consultant
mike.p@zend.com
(815) 722 3454




                                            © All rights reserved. Zend Technologies, Inc.
PHP Sessions
        Sun 11:30 AM                                         • What’s New with Zend Server


          Sun 1:30 PM                                        • Business Value of PHP


          Sun 4:00 PM                                        • Practical PHP by Example (Leth-Kjaer)


       Mon 10:00 AM                                          • PHP on IBM i: Getting Started


       Mon 10:00 AM                                          • DB Standards in Zend PHP usage (Sielhorst)


        Tue 10:00 AM                                         • MySQL on IBM i, Open Source & DB2 Store


        Tue 11:30 AM                                         • PHP Arrays for the RPG Programmer

| 2   Copyright © 2009 Zend Technologies, Inc, All rights
      reserved
                                                            © All rights reserved. Zend Technologies, Inc.   02/03/
Agenda

      • What is MySQL
      • Install
      • Access
      • GUI’s
      • DB2 Storage Engine
      • Q&A




| 3                          © All rights reserved. Zend Technologies, Inc.   02/04/
What is MySQL?

      • Most Popular and widely used Open Source Database

      • Relational Database management System (RDBMS)

      • Like DB2, but not, really

      • Command line interface

      • Many utilities available to manage

        • phpMyAdmin, Adminer,




| 4                        © All rights reserved. Zend Technologies, Inc.   02/04/
Who uses MySQL & why?

      • Millions of downloads

      • Big companies

      • Growing in IBM i

      • Nearly Everyone using open source PHP applications

      • Free

      • Open Source

      • Delivered by Zend

      • Back end for thousands of applications like drupal, Sugar
        CRM, Media Wiki, etc.
| 5                         © All rights reserved. Zend Technologies, Inc.   02/04/
How does it work?

      • Essentially flat files in the IFS

      • MySQL has two major parts:

         • UI Layer

         • Storage Engine

            • MyISAM

            • INNODB

            • IBMDB2

      • Sound familiar?


| 6                          © All rights reserved. Zend Technologies, Inc.   02/04/
Architecture




               © All rights reserved. Zend Technologies, Inc.
History of MySQL




         © All rights reserved. Zend Technologies, Inc.
In the beginning

      Founded by
        David Axmark
        Allan Larsson
        Michael “Monty” Widenius
      Named after Monty’s daughter “My” (Pronounced mee)




| 9                       © All rights reserved. Zend Technologies, Inc.   02/04/
Ownership

Remember MySQL is Open Source: Anyone can compile the
  source code and use the binaries as long as they follow the
  rules of the license.
Jan 2008:Sun purchased MySQL for $1B
Oracle purchased sun about year later for $7.4B
FUD ensues…
Today, MySQL continues to live on




                      © All rights reserved. Zend Technologies, Inc.
What about IBM i?

Two years ago Oracle dropped support for MySQL on Power
  and discontinued compiling the binaries.
Old binaries still available on Oracle archive site
IBM began looking for a new suitor
Zend stepped up and took over the binary distribution for
  MySQL for IBM i and the new product is called Zend DBi
Same wonderful MySQL, just compiled for POWER IBM i
Available for no charge at www.zend.com/products/dbi




                       © All rights reserved. Zend Technologies, Inc.
Installation, Zend DBi




          © All rights reserved. Zend Technologies, Inc.
First, remove old version???
       • If you have no real data…
            • Stop ZMYSQL Subsystem
            • Delete ZMYSQL library
            • RMVLNK ‘/usr/local/mysql*’
       • Knowledge base article 305 (Dated but still useful!)
            • http://kb.zend.com/index.php?View=entry&EntryID=305




| 13                         © All rights reserved. Zend Technologies, Inc.   02/04/
Zend DBi Installation process
       • Documented at Zend.com
       • Option to install or update within point release
             • Can update 5.1.n to 5.1.current (Zend Server)
             • Cannot update 5.0.n (Zend Core)
       • Download .zip from Zend.com, contains SAVF & README
       • Follow readme.txt in SAVF, pretty straight forward
       • Required LP’s are typically installed before Zend Server
       • A word about QSECOFR…



| 14                         © All rights reserved. Zend Technologies, Inc.   02/04/
Update anyone?
       • Here we have 5.1.50 (install with ZS 5.1)
       • Let’s go up to 5.1.59




| 15                         © All rights reserved. Zend Technologies, Inc.   02/04/
Start the installation process
       • Have ROOT password before updating
       • Just stop ZMYSQL
            • GO ZMYSQL/ZCMYSQL
            • Option 5 then Option 2 then exit MySQL menu




| 16                        © All rights reserved. Zend Technologies, Inc.   02/04/
Get SAVF to IBM i
       • FTP and check it…(DSPSAVF)




| 17                       © All rights reserved. Zend Technologies, Inc.   02/04/
Start the update process
       • Steps to fire up process
             • RSTLIB SAVLIB(ZMYSQL)
             • CHGCURLIB ZMYSQL
             • CALL ZMYSQLUPG1…update begins…




| 18                         © All rights reserved. Zend Technologies, Inc.   02/04/
Set update options
       • Have ROOT password before you get here
       • Will run MySQL script to update!
       • Without ROOT process will fail, QSECOFR doesn’t work here!




| 19                         © All rights reserved. Zend Technologies, Inc.   02/04/
Woohoo!




| 20             © All rights reserved. Zend Technologies, Inc.   02/04/
New subsystem and daemon
       • ZENDDBI
       • ZENDDBID




| 21                 © All rights reserved. Zend Technologies, Inc.   02/04/
MySQL Command Line




        © All rights reserved. Zend Technologies, Inc.
MySQL Monitor
       • MySQL has no native GUI interface (sound familiar?)
       • Command line accessible from QSHELL, QP2TERM, etc.
       • This is the brute force method for accessing.
       • Will show you access, but not a big fan.
       • Fully documented at mysql website
       • Many books on the subject




| 23                         © All rights reserved. Zend Technologies, Inc.   02/04/
Starting MySQL Monitor
       • I typically use CALL QP2TERM, can use QSH, etc.
       • The mysql> is the prompter for the monitor
            • Mysql –u root (First time, please set password!)
            • Mysql –u root –p mikey




| 24                        © All rights reserved. Zend Technologies, Inc.   02/04/
List all the databases
       • Show databases;
       • List all databases in MySQL
       • Database is like a library
       • Usually sorted by application




| 25                          © All rights reserved. Zend Technologies, Inc.   02/04/
Set database
       • Use <DBNAME>
       • Selects the database you will use for processing
               • Database is like a library, where you store tables, etc.
               • Typically on database per application




| 26                                    © All rights reserved. Zend Technologies, Inc.   02/04/
List tables




| 27                 © All rights reserved. Zend Technologies, Inc.   02/04/
Display the user table
       • Use SQL,
               • select host, user, password from user;




       • Use quit to end the session in the MySQL Monitor and F3 to close shell.



| 28                                    © All rights reserved. Zend Technologies, Inc.   02/04/
Are there any GUI’s?




          © All rights reserved. Zend Technologies, Inc.
Many GUI solutions

Adminer
  Single PHP script
  Lightweight, powerful and easy to use


phpMyAdmin
  Widely used by community
  Installed with Zend Server




                      © All rights reserved. Zend Technologies, Inc.
Adminer




          © All rights reserved. Zend Technologies, Inc.
phpMyAdmin
       • Open Source PHP Project
       • Provides nearly every access to MySQL you might need
       • Installed automatically with Zend Server.
            • Launch from Zend Server MonitorDashboard tab




| 32                           © All rights reserved. Zend Technologies, Inc.   02/04/
phpMyAdmin – Set ROOT password
       • Login with “root” profile
       • Create your profile
       • Test your profile
       • Change root password
         IMMEDIATELY (if not sooner)
       • This is a similar process as you
         might use for new LPARs




| 33                            © All rights reserved. Zend Technologies, Inc.   02/04/
Tour the dashboard..then on to privileges




| 34                   © All rights reserved. Zend Technologies, Inc.   02/04/
Privileges
       • Click Add new user
       • Fill out details, click GO




| 35                            © All rights reserved. Zend Technologies, Inc.   02/04/
Look at databases & tables
       • Left hand navigation
       • Right hand workspace
       • FULL CRUD capabilities
       • Think DFU for MySQL!




| 36                            © All rights reserved. Zend Technologies, Inc.   02/04/
IBM DB2 Storage
Engine




         © All rights reserved. Zend Technologies, Inc.
Why use MySQL to store data in DB2?

Many PHP applications in the open source arena
These application “talk” to MySQL by design
Modifying to access DB2 can be cumbersome & then updates?
Zend DBi includes IBM DB2 Storage Engine
Two instructions and you are there!




                      © All rights reserved. Zend Technologies, Inc.
Architecture




               © All rights reserved. Zend Technologies, Inc.
How to install

From the MySQL Monitor in QSH or QP2TERM
Now go to phpMyAdmin and select the engine




                    © All rights reserved. Zend Technologies, Inc.
IBM DB2 Storage Engine:phpMyAdmin

Create Table, set number of fields
Select storage engine




                        © All rights reserved. Zend Technologies, Inc.
phpMyAdmin gives you the SQL!




               © All rights reserved. Zend Technologies, Inc.
Add records to table




                © All rights reserved. Zend Technologies, Inc.
What happened on the i?

Library test was created
Table was created
Records populated




                      © All rights reserved. Zend Technologies, Inc.
Records, please?

STRSQL
Select * from test/exampleDB2




                     © All rights reserved. Zend Technologies, Inc.
IBM Redbook and Redpiece
 Discovering MySQL                            Using the DB2 Storage Engine




                     © All rights reserved. Zend Technologies, Inc.
Join us at ZendCon
The premier PHP conference!
October 22-25, 2012 – Santa Clara, CA




  Conference Themes                                                           Conference Highlights
  PHP in 2012 - The latest PHP technologies and tools                         • Sessions focused on how to best develop and deploy PHP
  Learn how to leverage the latest mobile, HTML 5, testing and
  PHP best practices                                                          • Sessions designed for all knowledge levels

  Zend Framework 2 - Hit the ground running                                   • Intensive tutorials for accelerated learning
  Learn how to build faster, more modular and more expandable                 • PHP Certification crash courses and testing
  applications
                                                                              • Exhibit hall showcasing the latest products
  Development & The Cloud – A love story
  Learn how the latest developments in cloud-based services,                  • Special networking opportunities during meals and events
  infrastructure and best practices can benefit you


                                                 www.zendcon.com
                                                © All rights reserved. Zend Technologies, Inc.
Q&A
                   www.zend.com
              mike.p@zend.com

         Please fill out your
         Session Evaluation!
48   Insert->Header & Footer   © All rights reserved. Zend Technologies, Inc.

Más contenido relacionado

La actualidad más candente

Oscon 2012 : From Datacenter to the Cloud - Featuring Xen and XCP
Oscon 2012 : From Datacenter to the Cloud - Featuring Xen and XCPOscon 2012 : From Datacenter to the Cloud - Featuring Xen and XCP
Oscon 2012 : From Datacenter to the Cloud - Featuring Xen and XCP
The Linux Foundation
 
Linaro Connect Asia 13 : Citrix - Xen on ARM plenary session
Linaro Connect Asia 13 : Citrix - Xen on ARM plenary sessionLinaro Connect Asia 13 : Citrix - Xen on ARM plenary session
Linaro Connect Asia 13 : Citrix - Xen on ARM plenary session
The Linux Foundation
 
Deploying Baremetal Instances with OpenStack
Deploying Baremetal Instances with OpenStackDeploying Baremetal Instances with OpenStack
Deploying Baremetal Instances with OpenStack
Etsuji Nakai
 
Azug - successfully breeding rabits
Azug - successfully breeding rabitsAzug - successfully breeding rabits
Azug - successfully breeding rabits
Yves Goeleven
 

La actualidad más candente (20)

Novell Open Enterprise Server Architecture
Novell Open Enterprise Server ArchitectureNovell Open Enterprise Server Architecture
Novell Open Enterprise Server Architecture
 
Better Practices when Using Terraform to Manage Oracle Cloud Infrastructure
Better Practices when Using Terraform to Manage Oracle Cloud InfrastructureBetter Practices when Using Terraform to Manage Oracle Cloud Infrastructure
Better Practices when Using Terraform to Manage Oracle Cloud Infrastructure
 
Heterogeneous Computing on POWER - IBM and OpenPOWER technologies to accelera...
Heterogeneous Computing on POWER - IBM and OpenPOWER technologies to accelera...Heterogeneous Computing on POWER - IBM and OpenPOWER technologies to accelera...
Heterogeneous Computing on POWER - IBM and OpenPOWER technologies to accelera...
 
Xen Orchestra: A new Web UI for XCP
Xen Orchestra: A new Web UI for XCPXen Orchestra: A new Web UI for XCP
Xen Orchestra: A new Web UI for XCP
 
Oscon 2012 : From Datacenter to the Cloud - Featuring Xen and XCP
Oscon 2012 : From Datacenter to the Cloud - Featuring Xen and XCPOscon 2012 : From Datacenter to the Cloud - Featuring Xen and XCP
Oscon 2012 : From Datacenter to the Cloud - Featuring Xen and XCP
 
Linaro Connect Asia 13 : Citrix - Xen on ARM plenary session
Linaro Connect Asia 13 : Citrix - Xen on ARM plenary sessionLinaro Connect Asia 13 : Citrix - Xen on ARM plenary session
Linaro Connect Asia 13 : Citrix - Xen on ARM plenary session
 
Scaling Xen within Rackspace Cloud Servers
Scaling Xen within Rackspace Cloud ServersScaling Xen within Rackspace Cloud Servers
Scaling Xen within Rackspace Cloud Servers
 
Introduction to Apache CloudStack by David Nalley
Introduction to Apache CloudStack by David NalleyIntroduction to Apache CloudStack by David Nalley
Introduction to Apache CloudStack by David Nalley
 
Web Performance First Aid
Web Performance First AidWeb Performance First Aid
Web Performance First Aid
 
Scale11x : Virtualization with Xen and XCP
Scale11x : Virtualization with Xen and XCP Scale11x : Virtualization with Xen and XCP
Scale11x : Virtualization with Xen and XCP
 
Whats new in ws2016 Hyper-V with Aidan Finn
Whats new in ws2016 Hyper-V with Aidan FinnWhats new in ws2016 Hyper-V with Aidan Finn
Whats new in ws2016 Hyper-V with Aidan Finn
 
Art of Using Xen at Scale
Art of Using Xen at ScaleArt of Using Xen at Scale
Art of Using Xen at Scale
 
Integrating Novell Teaming within Your Existing Infrastructure
Integrating Novell Teaming within Your Existing InfrastructureIntegrating Novell Teaming within Your Existing Infrastructure
Integrating Novell Teaming within Your Existing Infrastructure
 
Xen Orchestra: XAPI and XenServer from the web-XPUS13 Lambert
Xen Orchestra: XAPI and XenServer from the web-XPUS13 LambertXen Orchestra: XAPI and XenServer from the web-XPUS13 Lambert
Xen Orchestra: XAPI and XenServer from the web-XPUS13 Lambert
 
Leveraging CentOS and Xen for the Go Daddy Private Cloud
Leveraging CentOS and Xen for the Go Daddy Private CloudLeveraging CentOS and Xen for the Go Daddy Private Cloud
Leveraging CentOS and Xen for the Go Daddy Private Cloud
 
Deploying Apache CloudStack from API to UI
Deploying Apache CloudStack from API to UIDeploying Apache CloudStack from API to UI
Deploying Apache CloudStack from API to UI
 
Cloud stack for_beginners
Cloud stack for_beginnersCloud stack for_beginners
Cloud stack for_beginners
 
Xen: Hypervisor for the Cloud from Frontier Meetup Mountain View CA 2013-10-14
Xen: Hypervisor for the Cloud from Frontier Meetup Mountain View CA 2013-10-14Xen: Hypervisor for the Cloud from Frontier Meetup Mountain View CA 2013-10-14
Xen: Hypervisor for the Cloud from Frontier Meetup Mountain View CA 2013-10-14
 
Deploying Baremetal Instances with OpenStack
Deploying Baremetal Instances with OpenStackDeploying Baremetal Instances with OpenStack
Deploying Baremetal Instances with OpenStack
 
Azug - successfully breeding rabits
Azug - successfully breeding rabitsAzug - successfully breeding rabits
Azug - successfully breeding rabits
 

Destacado

DBMS lab manual
DBMS lab manualDBMS lab manual
DBMS lab manual
maha tce
 
Sql queries with answers
Sql queries with answersSql queries with answers
Sql queries with answers
vijaybusu
 

Destacado (15)

Sql dml & tcl 2
Sql   dml & tcl 2Sql   dml & tcl 2
Sql dml & tcl 2
 
Ppt INFORMATIVE PRACTICES for class 11th chapter 14
Ppt INFORMATIVE PRACTICES for class 11th chapter 14Ppt INFORMATIVE PRACTICES for class 11th chapter 14
Ppt INFORMATIVE PRACTICES for class 11th chapter 14
 
Programming Design Guidelines
Programming Design GuidelinesProgramming Design Guidelines
Programming Design Guidelines
 
Graph theory concepts complex networks presents-rouhollah nabati
Graph theory concepts   complex networks presents-rouhollah nabatiGraph theory concepts   complex networks presents-rouhollah nabati
Graph theory concepts complex networks presents-rouhollah nabati
 
SQL BASIC QUERIES SOLUTION ~hmftj
SQL BASIC QUERIES SOLUTION ~hmftjSQL BASIC QUERIES SOLUTION ~hmftj
SQL BASIC QUERIES SOLUTION ~hmftj
 
Dbms viva questions
Dbms viva questionsDbms viva questions
Dbms viva questions
 
DBMS lab manual
DBMS lab manualDBMS lab manual
DBMS lab manual
 
Sql queires
Sql queiresSql queires
Sql queires
 
Dbms lab questions
Dbms lab questionsDbms lab questions
Dbms lab questions
 
DBMS Practical File
DBMS Practical FileDBMS Practical File
DBMS Practical File
 
Best sql plsql material
Best sql plsql materialBest sql plsql material
Best sql plsql material
 
Top 100 SQL Interview Questions and Answers
Top 100 SQL Interview Questions and AnswersTop 100 SQL Interview Questions and Answers
Top 100 SQL Interview Questions and Answers
 
Data Base Management System
Data Base Management SystemData Base Management System
Data Base Management System
 
A must Sql notes for beginners
A must Sql notes for beginnersA must Sql notes for beginners
A must Sql notes for beginners
 
Sql queries with answers
Sql queries with answersSql queries with answers
Sql queries with answers
 

Similar a Introduction to My SQL

August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
Howard Greenberg
 
Citrix Synergy 2014 - Syn233 Building and operating a Dev Ops cloud: best pra...
Citrix Synergy 2014 - Syn233 Building and operating a Dev Ops cloud: best pra...Citrix Synergy 2014 - Syn233 Building and operating a Dev Ops cloud: best pra...
Citrix Synergy 2014 - Syn233 Building and operating a Dev Ops cloud: best pra...
Citrix
 

Similar a Introduction to My SQL (20)

Getting started with PHP on IBM i
Getting started with PHP on IBM iGetting started with PHP on IBM i
Getting started with PHP on IBM i
 
What's new with Zend server
What's new with Zend serverWhat's new with Zend server
What's new with Zend server
 
High performance PHP: Scaling and getting the most out of your infrastructure
High performance PHP: Scaling and getting the most out of your infrastructureHigh performance PHP: Scaling and getting the most out of your infrastructure
High performance PHP: Scaling and getting the most out of your infrastructure
 
Zend Products and PHP for IBMi
Zend Products and PHP for IBMi  Zend Products and PHP for IBMi
Zend Products and PHP for IBMi
 
Application Deployment on IBM i
Application Deployment on IBM iApplication Deployment on IBM i
Application Deployment on IBM i
 
Turbocharging php applications with zend server (workshop)
Turbocharging php applications with zend server (workshop)Turbocharging php applications with zend server (workshop)
Turbocharging php applications with zend server (workshop)
 
Getting started with PHP on IBM i
Getting started with PHP on IBM iGetting started with PHP on IBM i
Getting started with PHP on IBM i
 
A Tale of Two Toolkits
A Tale of Two ToolkitsA Tale of Two Toolkits
A Tale of Two Toolkits
 
Performance tuning PHP on IBMi
Performance tuning PHP on IBMiPerformance tuning PHP on IBMi
Performance tuning PHP on IBMi
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
 
Strategic Modernization with PHP on IBM i
Strategic Modernization with PHP on IBM iStrategic Modernization with PHP on IBM i
Strategic Modernization with PHP on IBM i
 
Turbocharging php applications with zend server
Turbocharging php applications with zend serverTurbocharging php applications with zend server
Turbocharging php applications with zend server
 
Scalable High-Availability Session Storage with ZSCM
Scalable High-Availability Session Storage with ZSCMScalable High-Availability Session Storage with ZSCM
Scalable High-Availability Session Storage with ZSCM
 
Introduction to column oriented databases in PHP
Introduction to column oriented databases in PHPIntroduction to column oriented databases in PHP
Introduction to column oriented databases in PHP
 
Lamp Introduction 20100419
Lamp Introduction 20100419Lamp Introduction 20100419
Lamp Introduction 20100419
 
Red Hat for IBM System z IBM Enterprise2014 Las Vegas
Red Hat for IBM System z IBM Enterprise2014 Las Vegas Red Hat for IBM System z IBM Enterprise2014 Las Vegas
Red Hat for IBM System z IBM Enterprise2014 Las Vegas
 
Citrix Synergy 2014 - Syn233 Building and operating a Dev Ops cloud: best pra...
Citrix Synergy 2014 - Syn233 Building and operating a Dev Ops cloud: best pra...Citrix Synergy 2014 - Syn233 Building and operating a Dev Ops cloud: best pra...
Citrix Synergy 2014 - Syn233 Building and operating a Dev Ops cloud: best pra...
 
Zend Code in ZF 2.0
Zend Code in ZF 2.0Zend Code in ZF 2.0
Zend Code in ZF 2.0
 
The Complete MariaDB Server Tutorial - Percona Live 2015
The Complete MariaDB Server Tutorial - Percona Live 2015The Complete MariaDB Server Tutorial - Percona Live 2015
The Complete MariaDB Server Tutorial - Percona Live 2015
 
Citrix Synergy 2014: Going the CloudPlatform Way
Citrix Synergy 2014: Going the CloudPlatform WayCitrix Synergy 2014: Going the CloudPlatform Way
Citrix Synergy 2014: Going the CloudPlatform Way
 

Más de COMMON Europe

Compiling the Compiler
Compiling the CompilerCompiling the Compiler
Compiling the Compiler
COMMON Europe
 

Más de COMMON Europe (20)

What's New in WebSphere Application Server
What's New in WebSphere Application ServerWhat's New in WebSphere Application Server
What's New in WebSphere Application Server
 
Compiling the Compiler
Compiling the CompilerCompiling the Compiler
Compiling the Compiler
 
Workload Groups overview updates
Workload Groups overview updatesWorkload Groups overview updates
Workload Groups overview updates
 
Why i - Common Europe 2012
Why i - Common Europe 2012Why i - Common Europe 2012
Why i - Common Europe 2012
 
The Ruby OpenSSL extension
The Ruby OpenSSL extensionThe Ruby OpenSSL extension
The Ruby OpenSSL extension
 
Using Ruby on IBM i (i5/OS)
Using Ruby on IBM i (i5/OS)Using Ruby on IBM i (i5/OS)
Using Ruby on IBM i (i5/OS)
 
IBM Systems Director Navigator for i
IBM Systems Director Navigator for iIBM Systems Director Navigator for i
IBM Systems Director Navigator for i
 
IBM i Trends & Directions Common Europe 2012
IBM i Trends & Directions Common Europe 2012IBM i Trends & Directions Common Europe 2012
IBM i Trends & Directions Common Europe 2012
 
IBM i Technology Refreshes Overview 2012 06-04
IBM i Technology Refreshes Overview 2012 06-04IBM i Technology Refreshes Overview 2012 06-04
IBM i Technology Refreshes Overview 2012 06-04
 
IBM i 7.1 & TRs CEC 2012
IBM i 7.1 & TRs CEC 2012IBM i 7.1 & TRs CEC 2012
IBM i 7.1 & TRs CEC 2012
 
DB2 Web Query whats new
DB2 Web Query whats newDB2 Web Query whats new
DB2 Web Query whats new
 
Access client solutions overview
Access client solutions overviewAccess client solutions overview
Access client solutions overview
 
RPG investment
RPG investmentRPG investment
RPG investment
 
Php arrays for RPG programmers
Php arrays for RPG programmersPhp arrays for RPG programmers
Php arrays for RPG programmers
 
Open source report writing tools for IBM i Vienna 2012
Open source report writing tools for IBM i  Vienna 2012Open source report writing tools for IBM i  Vienna 2012
Open source report writing tools for IBM i Vienna 2012
 
Moving 5.4 to 7.1 AB
Moving 5.4 to 7.1 ABMoving 5.4 to 7.1 AB
Moving 5.4 to 7.1 AB
 
IBM CEC 2012 Storage june 11, 2012
IBM CEC 2012 Storage june 11, 2012IBM CEC 2012 Storage june 11, 2012
IBM CEC 2012 Storage june 11, 2012
 
Developing mobile applications for i using open source tools Venna 2012
Developing mobile applications for i using open source tools  Venna 2012Developing mobile applications for i using open source tools  Venna 2012
Developing mobile applications for i using open source tools Venna 2012
 
DB2 for i 7.1 - Whats New?
DB2 for i 7.1 - Whats New?DB2 for i 7.1 - Whats New?
DB2 for i 7.1 - Whats New?
 
Common Europe SAP on i for beginners
Common Europe SAP on i for beginnersCommon Europe SAP on i for beginners
Common Europe SAP on i for beginners
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 

Introduction to My SQL

  • 1. MySQL for IBM i Function Junction Mike Pavlak Solutions Consultant mike.p@zend.com (815) 722 3454 © All rights reserved. Zend Technologies, Inc.
  • 2. PHP Sessions Sun 11:30 AM • What’s New with Zend Server Sun 1:30 PM • Business Value of PHP Sun 4:00 PM • Practical PHP by Example (Leth-Kjaer) Mon 10:00 AM • PHP on IBM i: Getting Started Mon 10:00 AM • DB Standards in Zend PHP usage (Sielhorst) Tue 10:00 AM • MySQL on IBM i, Open Source & DB2 Store Tue 11:30 AM • PHP Arrays for the RPG Programmer | 2 Copyright © 2009 Zend Technologies, Inc, All rights reserved © All rights reserved. Zend Technologies, Inc. 02/03/
  • 3. Agenda • What is MySQL • Install • Access • GUI’s • DB2 Storage Engine • Q&A | 3 © All rights reserved. Zend Technologies, Inc. 02/04/
  • 4. What is MySQL? • Most Popular and widely used Open Source Database • Relational Database management System (RDBMS) • Like DB2, but not, really • Command line interface • Many utilities available to manage • phpMyAdmin, Adminer, | 4 © All rights reserved. Zend Technologies, Inc. 02/04/
  • 5. Who uses MySQL & why? • Millions of downloads • Big companies • Growing in IBM i • Nearly Everyone using open source PHP applications • Free • Open Source • Delivered by Zend • Back end for thousands of applications like drupal, Sugar CRM, Media Wiki, etc. | 5 © All rights reserved. Zend Technologies, Inc. 02/04/
  • 6. How does it work? • Essentially flat files in the IFS • MySQL has two major parts: • UI Layer • Storage Engine • MyISAM • INNODB • IBMDB2 • Sound familiar? | 6 © All rights reserved. Zend Technologies, Inc. 02/04/
  • 7. Architecture © All rights reserved. Zend Technologies, Inc.
  • 8. History of MySQL © All rights reserved. Zend Technologies, Inc.
  • 9. In the beginning Founded by David Axmark Allan Larsson Michael “Monty” Widenius Named after Monty’s daughter “My” (Pronounced mee) | 9 © All rights reserved. Zend Technologies, Inc. 02/04/
  • 10. Ownership Remember MySQL is Open Source: Anyone can compile the source code and use the binaries as long as they follow the rules of the license. Jan 2008:Sun purchased MySQL for $1B Oracle purchased sun about year later for $7.4B FUD ensues… Today, MySQL continues to live on © All rights reserved. Zend Technologies, Inc.
  • 11. What about IBM i? Two years ago Oracle dropped support for MySQL on Power and discontinued compiling the binaries. Old binaries still available on Oracle archive site IBM began looking for a new suitor Zend stepped up and took over the binary distribution for MySQL for IBM i and the new product is called Zend DBi Same wonderful MySQL, just compiled for POWER IBM i Available for no charge at www.zend.com/products/dbi © All rights reserved. Zend Technologies, Inc.
  • 12. Installation, Zend DBi © All rights reserved. Zend Technologies, Inc.
  • 13. First, remove old version??? • If you have no real data… • Stop ZMYSQL Subsystem • Delete ZMYSQL library • RMVLNK ‘/usr/local/mysql*’ • Knowledge base article 305 (Dated but still useful!) • http://kb.zend.com/index.php?View=entry&EntryID=305 | 13 © All rights reserved. Zend Technologies, Inc. 02/04/
  • 14. Zend DBi Installation process • Documented at Zend.com • Option to install or update within point release • Can update 5.1.n to 5.1.current (Zend Server) • Cannot update 5.0.n (Zend Core) • Download .zip from Zend.com, contains SAVF & README • Follow readme.txt in SAVF, pretty straight forward • Required LP’s are typically installed before Zend Server • A word about QSECOFR… | 14 © All rights reserved. Zend Technologies, Inc. 02/04/
  • 15. Update anyone? • Here we have 5.1.50 (install with ZS 5.1) • Let’s go up to 5.1.59 | 15 © All rights reserved. Zend Technologies, Inc. 02/04/
  • 16. Start the installation process • Have ROOT password before updating • Just stop ZMYSQL • GO ZMYSQL/ZCMYSQL • Option 5 then Option 2 then exit MySQL menu | 16 © All rights reserved. Zend Technologies, Inc. 02/04/
  • 17. Get SAVF to IBM i • FTP and check it…(DSPSAVF) | 17 © All rights reserved. Zend Technologies, Inc. 02/04/
  • 18. Start the update process • Steps to fire up process • RSTLIB SAVLIB(ZMYSQL) • CHGCURLIB ZMYSQL • CALL ZMYSQLUPG1…update begins… | 18 © All rights reserved. Zend Technologies, Inc. 02/04/
  • 19. Set update options • Have ROOT password before you get here • Will run MySQL script to update! • Without ROOT process will fail, QSECOFR doesn’t work here! | 19 © All rights reserved. Zend Technologies, Inc. 02/04/
  • 20. Woohoo! | 20 © All rights reserved. Zend Technologies, Inc. 02/04/
  • 21. New subsystem and daemon • ZENDDBI • ZENDDBID | 21 © All rights reserved. Zend Technologies, Inc. 02/04/
  • 22. MySQL Command Line © All rights reserved. Zend Technologies, Inc.
  • 23. MySQL Monitor • MySQL has no native GUI interface (sound familiar?) • Command line accessible from QSHELL, QP2TERM, etc. • This is the brute force method for accessing. • Will show you access, but not a big fan. • Fully documented at mysql website • Many books on the subject | 23 © All rights reserved. Zend Technologies, Inc. 02/04/
  • 24. Starting MySQL Monitor • I typically use CALL QP2TERM, can use QSH, etc. • The mysql> is the prompter for the monitor • Mysql –u root (First time, please set password!) • Mysql –u root –p mikey | 24 © All rights reserved. Zend Technologies, Inc. 02/04/
  • 25. List all the databases • Show databases; • List all databases in MySQL • Database is like a library • Usually sorted by application | 25 © All rights reserved. Zend Technologies, Inc. 02/04/
  • 26. Set database • Use <DBNAME> • Selects the database you will use for processing • Database is like a library, where you store tables, etc. • Typically on database per application | 26 © All rights reserved. Zend Technologies, Inc. 02/04/
  • 27. List tables | 27 © All rights reserved. Zend Technologies, Inc. 02/04/
  • 28. Display the user table • Use SQL, • select host, user, password from user; • Use quit to end the session in the MySQL Monitor and F3 to close shell. | 28 © All rights reserved. Zend Technologies, Inc. 02/04/
  • 29. Are there any GUI’s? © All rights reserved. Zend Technologies, Inc.
  • 30. Many GUI solutions Adminer Single PHP script Lightweight, powerful and easy to use phpMyAdmin Widely used by community Installed with Zend Server © All rights reserved. Zend Technologies, Inc.
  • 31. Adminer © All rights reserved. Zend Technologies, Inc.
  • 32. phpMyAdmin • Open Source PHP Project • Provides nearly every access to MySQL you might need • Installed automatically with Zend Server. • Launch from Zend Server MonitorDashboard tab | 32 © All rights reserved. Zend Technologies, Inc. 02/04/
  • 33. phpMyAdmin – Set ROOT password • Login with “root” profile • Create your profile • Test your profile • Change root password IMMEDIATELY (if not sooner) • This is a similar process as you might use for new LPARs | 33 © All rights reserved. Zend Technologies, Inc. 02/04/
  • 34. Tour the dashboard..then on to privileges | 34 © All rights reserved. Zend Technologies, Inc. 02/04/
  • 35. Privileges • Click Add new user • Fill out details, click GO | 35 © All rights reserved. Zend Technologies, Inc. 02/04/
  • 36. Look at databases & tables • Left hand navigation • Right hand workspace • FULL CRUD capabilities • Think DFU for MySQL! | 36 © All rights reserved. Zend Technologies, Inc. 02/04/
  • 37. IBM DB2 Storage Engine © All rights reserved. Zend Technologies, Inc.
  • 38. Why use MySQL to store data in DB2? Many PHP applications in the open source arena These application “talk” to MySQL by design Modifying to access DB2 can be cumbersome & then updates? Zend DBi includes IBM DB2 Storage Engine Two instructions and you are there! © All rights reserved. Zend Technologies, Inc.
  • 39. Architecture © All rights reserved. Zend Technologies, Inc.
  • 40. How to install From the MySQL Monitor in QSH or QP2TERM Now go to phpMyAdmin and select the engine © All rights reserved. Zend Technologies, Inc.
  • 41. IBM DB2 Storage Engine:phpMyAdmin Create Table, set number of fields Select storage engine © All rights reserved. Zend Technologies, Inc.
  • 42. phpMyAdmin gives you the SQL! © All rights reserved. Zend Technologies, Inc.
  • 43. Add records to table © All rights reserved. Zend Technologies, Inc.
  • 44. What happened on the i? Library test was created Table was created Records populated © All rights reserved. Zend Technologies, Inc.
  • 45. Records, please? STRSQL Select * from test/exampleDB2 © All rights reserved. Zend Technologies, Inc.
  • 46. IBM Redbook and Redpiece Discovering MySQL Using the DB2 Storage Engine © All rights reserved. Zend Technologies, Inc.
  • 47. Join us at ZendCon The premier PHP conference! October 22-25, 2012 – Santa Clara, CA Conference Themes Conference Highlights PHP in 2012 - The latest PHP technologies and tools • Sessions focused on how to best develop and deploy PHP Learn how to leverage the latest mobile, HTML 5, testing and PHP best practices • Sessions designed for all knowledge levels Zend Framework 2 - Hit the ground running • Intensive tutorials for accelerated learning Learn how to build faster, more modular and more expandable • PHP Certification crash courses and testing applications • Exhibit hall showcasing the latest products Development & The Cloud – A love story Learn how the latest developments in cloud-based services, • Special networking opportunities during meals and events infrastructure and best practices can benefit you www.zendcon.com © All rights reserved. Zend Technologies, Inc.
  • 48. Q&A www.zend.com mike.p@zend.com Please fill out your Session Evaluation! 48 Insert->Header & Footer © All rights reserved. Zend Technologies, Inc.