Using RMySQL from Ubuntu

  • Install MySQL

sudo apt-get install mysql-server

  • Check if Server is Running

sudo netstat -tap | grep mysql

I use the MySQL command line to check it

To connect

mysql -h localhost -u root -p

To see databases

mysql>show databases;

To see tables

 

mysql> show tables from mysql;

To quit mysql

 

mysql> \q

Screenshot from 2015-07-23 17:48:51

  • Install and load RMySQL from within R

install.packages(“RMySQL”)

library(RMySQL)
  • I connect using this

mydb = dbConnect(MySQL(),
user=’root’,
password=’XXX’,
host=’localhost’,
port = 8018,
dbname=’mysql’)

  • I write sql queries using this
> dbGetQuery(mydb, "select * from  servers")
[1] Server_name Host        Db          Username    Password   
[6] Port        Socket      Wrapper     Owner      
<0 rows> (or 0-length row.names)
> dbGetQuery(mydb, "select * from  db")
 [1] Host                  Db                   
 [3] User                  Select_priv          
 [5] Insert_priv           Update_priv          
 [7] Delete_priv           Create_priv          
 [9] Drop_priv             Grant_priv           
[11] References_priv       Index_priv           
[13] Alter_priv            Create_tmp_table_priv
[15] Lock_tables_priv      Create_view_priv     
[17] Show_view_priv        Create_routine_priv  
[19] Alter_routine_priv    Execute_priv         
[21] Event_priv            Trigger_priv         
<0 rows> (or 0-length row.names)

Screenshot from 2015-07-23 18:16:09

Source-

https://help.ubuntu.com/12.04/serverguide/mysql.html

RMySQL 0.10.0

https://mkmanu.wordpress.com/2014/07/24/r-and-mysql-a-tutorial-for-beginners/

Sponsored: PAW Boston keynotes, agenda and workshops announced

 

BOSTON

Seaport World Trade Center

Sept. 27 – Oct. 1, 2015

Keynote Speakers:

DEAN ABBOTT

Co-Founder & Chief Data Scientist of SmarterHQ
DR. PATRICK SURRY

Chief Data Scientist

Hopper
CHRISTOPHER WIGGINS

Chief Data Scientist

The New York Times

Co-located Events:

Predictive Analytics World for Business announces Boston program

Predictive Analytics World (PAW) for B usiness covers a wide range of business applications for predictive analytics across industry sectors including marketing, credit scoring, insurance, fraud detection, web optimization, and much more.

What’s on the Agenda?

  • 30+ sessions focused on predictive analytics in the industries of business, insurance, retail, workforce, education and more
  • 30+ speakers from Elder Research, Inc., Merkle Inc., EMC, Talent Analytics, Corp., Verizon, Metlife, State Street Corp.
  • 20+ case studies from American Savings Bank, Telenor, Johnson Controls, Halliburton, Travelers, Fidelity, Paychex
  • 7 training workshops diving into big data, R, predictive modeling, hands-on methods, & supercharging prediction
  • 3 tracks to focus your learning: All Levels, Expert/Practitioner, Financial Services
  • Networking during at the exhibit hall, reception, breaks

View the Agenda

Why Attend?
Improve your predictive analytics proficiency to achieve:

  • Bigger wins – Strengthen the impact of predictive analytics deployment
  • Broader capabilities – Establish new opportunities in data science
  • Big data – Leverage bigger data for prediction and drive bigger value

Super Early Bird Rates
Register Here
Sign up by June 26th to keep up to $650 in your pocket with super early bird rates. Save an additional $200 with each additional attendee registering from the same company at the same time.

 

Decisionstats interviews John Sall, co-founder SAS for StatisticsViews.com

We just interviewed the legendary John Sall, co -founder of SAS Institute. What can I say? Mr Sall is awesome and shows us why here

http://www.statisticsviews.com/details/feature/8180721/Writing-code-helps-me-to-understand-the-development-process-so-that-I-can-make-b.html

6. Do you still write code? Describe what keeps you motivated in coding.

I do still write code. It’s something I enjoy, and I’m good at it. I like to express myself in code. Writing code helps me to understand the development process so that I can make better judgments about it.

 

 

Speaking at IIMNetwork

I am speaking at this event next Sunday

There is a discount code

Register with discount code of 20% off on INR 3000 Pass

DISCOUNT CODE : INWKPTR20
(limited to 50 registrations only)

 

Delhi – 26 Jul 2015

Screenshot from 2015-07-19 22:22:37