Database Journal
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Tips Database Forum

» Database Journal Home
» Database Articles
» Database Tutorials
MS Access
SQL Scripts & Samples
» Database Forum
» Slideshows
» Sitemap
Free Newsletters:

By submitting your information, you agree that databasejournal.com may send you databasejournal offers via email, phone and text message, as well as email offers about other products and services that databasejournal believes may be of interest to you. databasejournal will process your information in accordance with the Quinstreet Privacy Policy.

News Via RSS Feed

Database Journal |DBA Support |SQLCourse |SQLCourse2

Featured Database Articles


Posted Nov 10, 2004

Oracle Migration Workbench - Part Two

By Steve Callan

At the end of Part One, we were at the point where MySQL was ready to be installed. In part two of this series, we will go through some quick setup steps, create a user with some privileges, and load data - using several methods - into a MySQL database. Once the setup of the MySQL database is complete, we will be ready to start using Migration Workbench.

Starting and Using MySQL

MySQL (the company) provides user documentation in the Docs directory of where you installed MySQL (the product). Assuming you used the default installation target (on Windows) of C:\mysql, the HTML-based documentation, using a table of contents similar to what you see when looking at Oracle's list of books, is located at C:\mysql\Docs. The MySQL Tutorial book published by MySQL Press is a condensed version of the documentation.

After installing MySQL, create a configuration file (my.ini, located in C:\Windows) using the following parameters (or just cut and paste what is shown below):

# turn on binary logging and slow query logging

# InnoDB config
# This is the basic config as suggested in the book
innodb_data_file_path = ibdata1:10M:autoextend
# Set buffer pool size to
# 50-80% of computer's memory
set-variable = innodb_buffer_pool_size=70M
set-variable = innodb_additional_mem_pool_size=10M
# Set the log file size to about
# 25% of the buffer pool size
set-variable = innodb_log_file_size=20M
set-variable = innodb_log_buffer_size=8M
# Set flush_log_at_trx_commit
# to 0 if you can afford losing
# some last transactions

Assuming you are in c:\mysql\bin, install MySQL as a service using :

c:\mysql\bin> mysqld-max --install

Once you see that the service has been created, you can start MySQL using the Services control panel or by issuing the net start service_name (net start mysql) command at the command prompt.

To connect as "root" privileged user much like sys and system), at the command prompt enter

c:\mysql\bin> mysql -u root

Once connected (you'll see a "mysql>" prompt), set a password for root using

mysql> set password for root@localhost=password('admin');

I used "admin" for its obviously hard to guess and highly secure value; you can use whatever you want. Log out of MySQL using a "\q" and then log back in using a slightly different format (add a "-p" parameter). You will be prompted for root's password.

After logging in (without specifying a database name as a parameter), you are connected, but to what? MySQL installs with two databases: mysql and test. The MySQL database is analogous to Oracle's data dictionary, and the test database is like the seed database Oracle Universal Installer creates, but test has nothing in it. To select a database for use, use "use database_name" at the MySQL prompt.

To see what is in the MySQL database, let's "use" it and issue a "show tables;" command as root.

Note that some commands (actually, most of them) require a semicolon. It seems that it would be more consistent to allow "show tables" without a semicolon given that "use database_name" does not require it. To make things simple, end every command (except the ones beginning with a backslash) with a semicolon.

The next three steps will delete anonymous accounts, create a database named "OMWB" and create a "tiger identified by scott" user with certain privileges on the OMWB database. Try not to be overwhelmed by the complexity of the username and password combination I will be using in this example.

If you use the MySQL Tutorial book's example for creating a user, some of the privileges shown in the example grant statement (create temporary tables, lock tables, and show databases) do not work unless you're using version 4 of MySQL. The following code can be copied into a command prompt window (Hello Microsoft, why can't we just call it a DOS window?):

delete from user where user='';
delete from db where user='';
flush privileges;

create database omwb;

grant create, delete, index,
insert, select, update
on omwb.*
to tiger identified by 'scott';

If you need (or want) to re-run the create database statement, just add "drop database if exists OMWB;" before the create statement.

Oracle Archives

Comment and Contribute


(Maximum characters: 1200). You have characters left.



Latest Forum Threads
Oracle Forum
Topic By Replies Updated
Oracle Data Mining: Classification jan.hasller 0 July 5th, 07:19 AM
Find duplicates - Unique IDs Lava 5 July 2nd, 08:30 AM
no matching unique or primary key rcanter 1 April 25th, 12:32 PM
Update values of one table based on condition of values in other table using Trigger Gladiator 3 February 29th, 06:01 PM

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.