MySQL

M

Marcin Tyman

Hi,
How to operate on MySQL? I would like to delete, create database and
upgrade with prepared files. I know mysql library but I'm not sure
whether it let me operate on commands such as delete database, source
file_path etc.

I will be appreciated for any help

MT
 
R

Ronald Fischer

I would like to delete, create database and
upgrade with prepared files. I know mysql library but I'm not sure
whether it let me operate on commands such as delete database, source
file_path etc.

If you connect with administrator privileges, you should be able
to execute any command you could also execute from the mysql
command line interface.

Ronald
--=20
Ronald Fischer <[email protected]>
Phone: +49-89-452133-162
 
M

Marcin Tyman

Ronald said:
If you connect with administrator privileges, you should be able
to execute any command you could also execute from the mysql
command line interface.

Ronald

dbh.query("source c:/create.sql") - doesn't work. It causes SQL syntax.
 
R

Ronald Fischer

dbh.query("source c:/create.sql") - doesn't work. It causes=20
SQL syntax.

True, but for this case, you can always do

IO.readlines("c:/create.sql").each { |s| dbh.query(s) }

Ronald
--=20
Ronald Fischer <[email protected]>
Phone: +49-89-452133-162
 
M

Marcin Tyman

Ronald said:
True, but for this case, you can always do

IO.readlines("c:/create.sql").each { |s| dbh.query(s) }

Ronald


Thanks, I'll check it. It seems to be ok. At the moment I cannot check
it (the db is used)
 
A

Ari Brown

Hi,
How to operate on MySQL? I would like to delete, create database and
upgrade with prepared files. I know mysql library but I'm not sure
whether it let me operate on commands such as delete database, source
file_path etc.

I will be appreciated for any help


You can use Ruby/MySQL, MySQL/Ruby, DBI, or ActiveRecord

~ Ari
English is like a pseudo-random number generator - there are a
bajillion rules to it, but nobody cares.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,263
Messages
2,571,312
Members
47,988
Latest member
HarryBeck

Latest Threads

Top