MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] MySql and Minivend



******    message to minivend-users from Dan Busarow <dan@dpcsys.com>     ******

On Thu, 23 Dec 1999, Eric Paul wrote:
> My client's database is eventually going to grow bigger than can be sanely 
> handled using ASCII database files.  I downloaded the latest stable version 
> of MySql and installed it on my server.  I'm in the process of reading thru 
> the HUGE doc files for MySql and getting overwhelmed.  I know a little bit 
> about basic SQL commands from interfacing some M$ products, but this is a 
> bit over my head.  Can anyone point me in the direction of some good 
> beginning tutorials (books or web pages are fine) on learning MySql and how 
> to easily integrate it with Minivend.  I read the SQL section of the 
> Minivend docs, and it seems straightforward once I have all the tables 
> setup, but I'm not really sure how to get to that point.  The MySql docs 
> seem to deal with database entry thru the console-based module, and I can't 
> believe that this is how people really do things.  Seems a bit back-assward 
> to have to enter all your items in a command line proggie just to get your 
> multi-thousand item database set up :P

Hey, this is Unix.  CLI rules :)

To create a database named minivend using mysql you need to run

# mysqladmin create minivend

as the mysql super user which is root by default.

Once you've created the database you need to create your tables.
You can do this using the mysql monitor (mysql) but I find it
easier to put the commands in a text file and run that through
mysql.  Like this

$ cat newtable
create table products (
 code varchar(16) not null primary key,
 description varchar(64),
 weight int,
 price int,
 rest of the table def ...
);

See the CREATE command in the mysql docs (which are excellent BTW)
for fine points.  After you've created the file with the create
statements in it run

$ mysql minivend < newtable

Then you'll need to install DBI and DBD, see

http://www.symbolstone.org/technology/perl/DBI/index.html

You want DBI and Msql-Mysql-modules

After you install DBI and DBD write some test scripts to make
sure it's working.  Once you know that mysql and DBI::DBD are
working change your catalog.cfg to use it.

Dan
-- 
 Dan Busarow                                                  949 443 4172
 Dana Point Communications, Inc.                            dan@dpcsys.com
 Dana Point, California  83 09 EF 59 E0 11 89 B4   8D 09 DB FD E1 DD 0C 82

-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list



Search for: Match: Format: Sort by: