MySQL Tutorial - PowerPoint PPT Presentation

1 / 11
About This Presentation
Title:

MySQL Tutorial

Description:

http://www.mysql.com/get/Downloads/MySQL-4.0/mysql-4.0.17-win. ... C:mysqlbin mysql h localhost u root p. NOTE: THE DEFAULT PASSWORD FOR ROOT IS BLANK ! ... – PowerPoint PPT presentation

Number of Views:2797
Avg rating:3.0/5.0
Slides: 12
Provided by: csdlIcs
Category:

less

Transcript and Presenter's Notes

Title: MySQL Tutorial


1
MySQL Tutorial
  • By
  • John Bouchard II
  • Bruce Harris

2
Installing MySQL
  • ? Download MySQL 4.0.17 at
  • http//www.mysql.com/get/Downloads/MySQL-4.0/mysq
    l-4.0.17-win.zip/from/http//mysql.orst.edu/
  • Unzip mysql-4.0.1-win.zip and execute
    setup.exe
  • ? Choose a directory, select typical install
    options.

3
  • Once installation is complete, go to your
    autoexec.bat file
  • and put SET MYSQL_HOMEC\mysql
  • SET PATH MYSQL_HOME\binPAT
    H
  • -where C\mysql is the location where you
    installed mysql.
  • Once mysql is installed, and your variables are
    setup,
  • you need to install the mysql server
    service. To do this type
  • C\mysql\bingt mysqld --install
    //installs the service
  • C\mysql\bingt NET START MYSQL //start the
    mysql server

4
Connecting to the MySQL Server
  • SYNTAX mysql -h host -u user -p
  • ltlt EXAMPLE gtgt
  • C\mysql\bingt mysql h localhost u root p
  • NOTE THE DEFAULT PASSWORD FOR ROOT IS BLANK !!!

5
Changing ROOT password
  • ? GET USER FIRST
  • C\mysql\bingt mysql -u root mysql
  • ? CHANGE PASSWORD SYNTAX
  • mysqlgt UPDATE user SET PasswordPASSWORD('new_pass
    word')
  • WHERE user'root'
  • mysqlgt FLUSH PRIVILEGES
  • DON NOT FORGET THE semi-colon

6
Interfacing with MySQL Server
  • The command-line is too cumbersome, we need a
    GUI!!
  • Enter the MySQL Control Center
  • Download at http//www.mysql.com/get/Downloads/My
    SQLCC/mysqlcc-0.9.4-win32.zip/from/http//mysql.or
    st.edu/
  • Unzip mysqlcc-0.9.4-win32.zip and install

7
  • Open Control Center and Register your MySQL
    Server
  • NAME Any name you want
  • HOST DNS NAME OR IP-ADDRESS of MySQL SERVER
  • USERNAME Usually root
  • PASSWORD Leave blank, UNLESS you changed it.

8
Hack the GUI on your own time!
9
Interfacing with Java Important Points
  • Use ConnectorJ JDBC Driver
  • Include mysql-connector-java-3.0.10-stable-bin.jar
    in your java project
  • Import com.mysql.jdbc.Driver
  • Get to know the java.sql. Package!
  • Understand DriverManager and its
    relationship with a Connection.
  • OTHER CLASSES OF USE
  • ResultSet - The format Data is retrieved from
    a Database.
  • Statement - Used to query a Database for a
    ResultSet.
  • CallStatement - Execute a StoredProcedure in
    the database to
  • obtain a ResultSet.

10
Interfacing with Java Example Code
11
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com