May
16
2017
--

Apple is shoring up Siri for its next generation of intelligent devices

 Siri is a critical component of Apple’s vision for the future, so integral that it was willing to spend $200 million to acquire Lattice Data over the weekend. The startup was working to transform the way businesses deal with paragraphs of text and other information that lives outside neatly structured databases. These engineers are uniquely prepared to assist Apple with building… Read More

Mar
16
2017
--

WePay now accepts Apple Pay and Android Pay on the web

 Apple Pay and Android Pay may be best known as Apple and Google’s mobile wallets, designed to expand their businesses in making payments with smartphones. But today comes an advance that underscores how both are also vying to be consumers’ virtual wallets for all e-commerce transactions. WePay, the payments company that competes against the likes of incumbents like FirstData… Read More

Sep
07
2016
--

All the ways you are probably going to lose an AirPod

apple-liveblog0637 Apple has some wireless earbuds! They’re $159, and they aren’t connected by a cable to anything. They go right into your ear when they aren’t in a case that’s charging them. The battery lasts for 5 hours or so, and the case can charge them for 24 hours. Really cool, right? It’s like, straight out of the movie Her. But in Her, the characters are only wearing… Read More

Sep
07
2016
--

Apple’s iPhone 7 storage finally starts at 32GB

iPhone SE - iPhone 6s Plus - 14 The iPhone’s base-level storage — starting at 16GB — has been a sticking point for quite a while. More and more content has become available over time in the form of video, apps and photos, and it can be a big limiting factor forcing users to shell out extra cash in order to skirt those requirements. Today, fortunately, that era comes to an end. The cheapest version of the… Read More

Sep
07
2016
--

Apple takes on Google & Microsoft with iWorks real-time collaboration

screen-shot-2016-09-07-at-10-26-47 Announced at Apple’s event today, the company takes on Google Documents with real-time collaboration on iWorks documents. The long-awaited feature makes it easier to cooperate on creating documents on the fly. Read More

Aug
29
2016
--

Alphabet’s David Drummond leaves Uber’s board amid mounting competition

uber-self-driving-car David Drummond, who joined Uber’s board of directors in August 2013, stepped down several weeks ago, Uber has confirmed to TechCrunch. The Wall Street Journal first reported the news. At first blush: no surprise whatsoever. Earlier this month, Uber CEO Travis Kalanick said the company’s first fleet of self-driving cars would begin running in Pittsburgh soon (as soon as this… Read More

Jul
26
2016
--

Everything you need to know about Apple’s huge third quarter

tim cook Apple’s third quarter results came out today. They’re pretty good! Or, at least, not bad — and good enough to keep investors happy. Very happy, actually: the stock jumped more than 7%, recovering pretty much all of the value it lost when it reported a complete whiff of a second quarter. It’s no monster crash or jump like Twitter regularly experiences, but 7% is enough… Read More

Jul
26
2016
--

Apple beats earnings expectations by a mile, and its stock is soaring

tim cook Apple needed a breakout quarter after its last whiff, and boy did it get one. The company reported revenue of $42.4 billion and earnings of $1.42 per share. Analysts were expecting earnings of $1.38 per share on revenue of $42.09 billion. As a result the company added tens of billions of value back to its share price, which rose 5% in extended trading. (5% might not feel like a lot, but for… Read More

Jun
13
2016
--

Apple’s latest foray into the enterprise involves deeper integration with Cisco

shutterstock apple Lost in the hubbub of today’s two hour-plus Apple WWDC keynote was an announcement of deep integration between Apple and Cisco in the upcoming release of iOS 10 — yes, you read it correctly, Cisco. When it comes to enterprise partnerships, IBM has gotten the lion’s share of the attention. More recently, SAP made a high-profile partnership announcement of its own, but… Read More

May
11
2016
--

Quick start MySQL testing using Docker (on a Mac!)

MySQL testing using DockerIn this post, we’ll discuss how you can quick start MySQL testing using Docker, specifically in a Mac environment.

Like a lot of people, I’m hearing a lot about Docker and it’s got me curious. The Docker ecosystem seems to be moving quickly, however, and simple “getting started” or “how-to” type articles that are easy to find for well-established technologies seem to be out-of-date or non-existent for Docker. I’ve been playing with Docker on Mac for a bit, but it is definitely a second-class citizen in the Docker world. However, I saw Giuseppe’s blog on the new Docker beta for Mac and decided to try it for myself. These steps work for the beta version on a Mac (and probably Windows), but they should work with Linux as well (using the GA release, currently Docker 1.11.1).

The new Docker beta for Mac requires that you register for the beta program, and receive a download code from Docker. I got mine in about a day, but I would assume it won’t be long before the full version is released.

Once installed, I needed to setup some Docker containers for common MySQL versions so that I can easily have some sandboxes. The method I used is below:

jayj@~ [510]$ docker network create test
90005b3ffa9fef1f817ee4965e794a567404c9a8d5bf07320514e7d848d59ff9
jayj@~ [511]$ docker run --name=mysql57 --net=test -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -d mysql/mysql-server:5.7
6c80fa89610dbd5418ba474ad7d5451cd061f80a8a72ff2e718341827a08144b
jayj@~ [512]$ docker run -it --rm --net=test -e MYSQL_HOST=mysql57 mysql/shell init
Creating a Classic Session to root@mysql57:3306
Enter password:
No default schema selected.
enableXProtocol: Installing plugin mysqlx...
enableXProtocol: done

A quick summary of what I did above:

  1. I created a network called “test” for my containers to share, essentially this is a dedicated private network between containers.  I like this because multiple containers can listen on the same port and I don’t have to fight with ports on my host OS.
  2. I started a MySQL 5.7 image from Oracle’s official MySQL Docker container bound to that test network.
  3. I used the MySQL/shell image (also from Oracle) to initialize the mysqlx plugin on my 5.7 server. Notice I didn’t enter a password because I created the server without one (insecure, but it’s a sandbox).

The shell init uses a temporary container that is removed (–rm) after the run, so you don’t pollute your

docker ps -a

 a output.

So, now I want to be able to use the standard MySQL command line and/or the new MySQL shell to access this container.  To  make this really clean, I added some bash aliases:

alias mysqlsh='docker run -it --rm --net=test mysql/shell'
alias mysql='docker run -it --rm -e MYSQL_ALLOW_EMPTY_PASSWORD=yes --net=test --entrypoint="mysql" mysql/mysql-server:5.7'

With these in effect, I can call them directly and pass normal command line options to connect to my mysql57 image just as if I was using a native MySQL CLI binary.

Using the MySQL CLI from the 5.7 image:

jayj@~ [524]$ mysql -h mysql57
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 4
Server version: 5.7.12 MySQL Community Server (GPL)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
mysql> show schemas;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.01 sec)

Using the MySQL shell:

jayj@~ [527]$ mysqlsh -h mysql57 -u root --session-type=node
Creating a Node Session to root@mysql57:33060
Enter password:
No default schema selected.
Welcome to MySQL Shell 1.0.3 Development Preview
Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help', 'h' or '?' for help.
Currently in JavaScript mode. Use sql to switch to SQL mode and execute queries.
mysql-js> sql
Switching to SQL mode... Commands end with ;
mysql-sql> show schemas;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.00 sec)
mysql-sql>

Now if I want to run check MySQL 5.5 for something, I can just do this:

jayj@~ [530]$ docker run --name=mysql55 --net=test -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -d mysql/mysql-server:5.5
Unable to find image 'mysql/mysql-server:5.5' locally
5.5: Pulling from mysql/mysql-server
a3ed95caeb02: Already exists
ffe36b360c6d: Already exists
646f220a8b5d: Pull complete
ed65e4fea7ed: Pull complete
d34b408b18dd: Pull complete
Digest: sha256:12f0b7025d1dc0e7b40fc6c2172106cdf73b8832f2f910ad36d65228d9e4c433
Status: Downloaded newer image for mysql/mysql-server:5.5
6691dd9d42c73f53baf2968bcca92b7f4d26f54bb01d967be475193305affd4f
jayj@~ [531]$ mysql -h mysql55
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 1
Server version: 5.5.49 MySQL Community Server (GPL)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
mysql> show schemas;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
+--------------------+
3 rows in set (0.00 sec)

or, Percona Server:

jayj@~ [534]$ docker run --name=ps57 --net=test -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -d percona/percona-server:5.7
Unable to find image 'percona/percona-server:5.7' locally
5.7: Pulling from percona/percona-server
a3ed95caeb02: Pull complete
a07226856d92: Pull complete
eee62d87a612: Pull complete
4c6755120a98: Pull complete
10eab0da5972: Pull complete
d5159a6502a4: Pull complete
e595a1a01d00: Pull complete
Digest: sha256:d57f0ce736f5403b1714ff8d1d6b91d5a7ee7271f30222c2bc2c5cad4b4e6950
Status: Downloaded newer image for percona/percona-server:5.7
9db503852747bc1603ab59455124663e8cedf708ac6d992cff9b43e2fbebd167
jayj@~ [537]$ mysql -h ps57
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 2
Server version: 5.7.10-3 Percona Server (GPL), Release 3, Revision 63dafaf
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
mysql>

So all this is nice – once the images are cached locally, spinning new containers up and down is painless and fast. All this sandbox work is cleanly separated from my workstation OS. There are probably other things I’d want to be able to do with this setup that I haven’t figured out yet (e.g., loading data files, running code to connect to these containers, etc.) – but I’ll figure those out in the future.

Powered by WordPress | Theme: Aeros 2.0 by TheBuckmaker.com