[R] User R to create MySQL database and table

Prof Brian Ripley ripley at stats.ox.ac.uk
Sun May 23 08:18:22 CEST 2010


On Sat, 22 May 2010, Waverley @ Palo Alto wrote:

> Hi,
>
> I am thinking about using R to create a database, then create table in
> MySQL server.  Can I do that using RMySQL package?

Maybe: it is done by SQL commands which you can use *if* you have the 
correct privileges.

However, this is R-help, not R-sig-db and discussion of non-R 
programming questions in detail would not be appropriate.  If you do 
want to follow up on R-sig-db, do first study the R posting guide and 
provide the 'at a minimum' information requested.

>
> I am familiar with RMySQL, and in the online help most of the sample
> code assumes the database exists and transact with the table inside
> the database.
>
> Can someone provide me some sample code to create a database and
> table?  Specifically create a database first, then create a table
> inside the database.
>
> Thanks a lot in advance.
>
> -- 
> Waverley @ Palo Alto
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list