• No results found

MySQL for IBM i Or Zend DBi == MySQL!

N/A
N/A
Protected

Academic year: 2021

Share "MySQL for IBM i Or Zend DBi == MySQL!"

Copied!
52
0
0

Loading.... (view fulltext now)

Full text

(1)

Mike Pavlak

Solutions Consultant

[email protected]

(815) 722 3454

Function Junction

MySQL for IBM i

Or

(2)

Agenda

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

(3)

What is MySQL?

Most Popular and widely used Open Source Database

Relational Database management System (RDBMS)

Like DB2, but not, really

Command line interface

(4)

Who uses MySQL & why?

Millions of downloads

Big companies

Growing in IBM i

Nearly Everyone using open source PHP applications

Free

Open Source

(5)

How does it work?

Essentially flat files in the IFS

MySQL has two major parts:

UI Layer

Storage Engine

MyISAM

INNODB

(6)
(7)
(8)

In the beginning

Founded by

David Axmark Allan Larsson

Michael “Monty” Widenius

(9)

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…

(10)

What about IBM i?

Zend DBI == MySQL

A few 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

(11)
(12)

MySQL Options

• If you have never installed MySQL or Zend DBi

• Perform a clean installation of Zend DBi

• Otherwise, if you have MySQL & no real data

• Delete MySQL (Steps on next slide)

• If you have data and are at Version 5.1.x of MySQL

• Update to Zend DBI via the install process

• Lastly, if you have data at a version 5.0.x or lower

(13)

Details on deleting MySQL

• Steps for a clean removal…

• ENDSBS ZMYSQL OPTION(*IMMED)

• DLTLIB ZMYSQL • CALL QP2TERM • rm -f /usr/local/mysql • rm -r -f /usr/local/mysql-5.1.50-i5os-power-64bit • rm -r -f /usr/local/mysqldata • rm -f /etc/my.cnf • rm -f /tmp/mysql.sock

(14)

Zend DBi Installation process

• Documented at Zend.com

• Option to install or update within point release

• Can update 5.1.x to 5.1.y (Zend Server)

• Cannot update 5.0.x to 5.1.y (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

(15)

Update anyone?

• Here we have 5.1.50 (install with ZS 5.1)

(16)

Start the installation process

• Have ROOT password before updating

• Just stop ZMYSQL

• GO ZMYSQL/ZCMYSQL

(17)

Get SAVF to IBM i

• FTP and check it…

(18)

Start the update process

• Steps to fire up process

• RSTLIB SAVLIB(ZMYSQL)

• CHGCURLIB ZMYSQL

(19)

Set update options

• Have ROOT password before you get here

(20)
(21)

New subsystem and daemon

• ZENDDBI

(22)
(23)

MySQL Monitor

• MySQL has no native GUI interface (sound familiar?)

• Command line accessible from QSHELL, QP2TERM, etc.

• This is the natural method for accessing.

• Will show you access, but not a big fan.

• Fully documented at MySQL website

(24)

Starting MySQL Monitor

• I typically use CALL QP2TERM, can use QSH, etc.

• The mysql> is the prompter for the monitor

• Mysql –u root

(25)

Difference between QP2TERM and Qshell

• QP2TERM is window to PASE

• Cannot run IBM native programs like DB2, etc.

• Qshell is a Unix like shell

• Runs many things you find on Unix and IBM binaries

(26)

List all the databases

Show databases;

List all databases in MySQL

Database is like a library

Usually sorted by application

Don’t forget the semi-colon!

(27)

Set database

Use <DBNAME>

Selects the database you will use for processing

Database is like a library, where you store

tables, etc.

(28)
(29)

Display the user table

• Use SQL: select host, user, password from user;

(30)
(31)

Many GUI solutions

Adminer

Single PHP script

Lightweight, powerful and easy to use phpMyAdmin

Widely used by community Installed with Zend Server

(32)
(33)

phpMyAdmin

• Open Source PHP Project

• Provides nearly every access to MySQL you might need

• Installed automatically with Zend Server.

• Access from Zend Server Dashboard…

• Documentation at

(34)

phpMyAdmin

• Login with “root” profile

• Create your profile

• Test your profile

• Change root password

(35)
(36)

phpMyAdmin

• Login with “root” profile

• Create your profile

• Test your profile

• Change root password

(37)

Privileges

• Click Add new user

(38)

Look at databases & tables

• Left hand navigation

• Right hand workspace

• FULL CRUD capabilities

(39)

IBM DB2 Storage

Engine

(40)

Why use MySQL to store in DB2?

Many PHP applications in the open source arena Can be easily installed

Modifying to access DB2 can be cumbersome & then updates? Zend DBi includes IBM DB2 Storage Engine

(41)
(42)

How to install

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

(43)

IBM DB2 Storage Engine:phpMyAdmin

Create Table, set number of fields

(44)
(45)
(46)

What happened on the i?

Library test was created

Table was created Records populated

(47)

Records, please?

STRSQL

(48)
(49)

IBM Redbook and Redpiece

(50)

Events where you’ll find Zend…

COMMON Fall Conference (Columbus, OH) Sep 24-26

http://www.common.org/index.php/fall-conference-and-expo.html

(51)

Join us at ZendCon

The premier PHP conference!

October 22-25, 2012 – Santa Clara, CA

Conference Themes

PHP in 2012 - The latest PHP technologies and tools

Learn how to leverage the latest mobile, HTML 5, testing and PHP best practices

Zend Framework 2 - Hit the ground running

Learn how to build faster, more modular and more expandable applications

Conference Highlights

•Sessions focused on how to best develop and deploy PHP • Sessions designed for all knowledge levels

• Intensive tutorials for accelerated learning • PHP Certification crash courses and testing • Exhibit hall showcasing the latest products

(52)

Q&A

www.zend.com

References

Related documents

• Taxpayers subject to the provisions of Title II of the Income Tax Law (ITL) which have declared taxable income of $644,599,005 or more in the immediately preceding tax

Resume recovery feature of Stellar Phoenix Photo Recovery allows you to recover photos, audio and video files using saved scan information file or image file.. You can use the

A process was developed to identify potential defects in previous layers of Selective Laser Melting (SLM) Powder Bed Fusion (PBF) 3D printed metal parts using a mid-IR thermal camera

Steele of Stanford University Online High said that shift is already underway: In a recent survey of ASCA members, she and her colleagues found that more than one-fourth of

College Mathematics (3 Credits) Biology (6 Credits) Arts and Humanities 3 Arts and Humanities 3 TOTAL 35 20 8.00 **Total up RED # ** Excess credits 0.00 8.00 Analyzing and

Facet joint arthropathy - osteophyte formation and distortion of joint alignment MRI Axial T2 L3-L4 disk Psoas Paraspinal muscles Psoas Paraspinal NP AF MRI Axial T2 PACS, BIDMC

The companies Berlin Partner GmbH and ZukunftsAgentur Branden- burg GmbH (Brandenburg Economic Development Board) support with a large range of services, from recruiting