SlideShare a Scribd company logo
1 of 11
MySQL Tutorial
Installing MySQL
 Download MySQL 4.0.17 at:
http://www.mysql.com/get/Downloads/MySQL-4.0/mysql-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.
 Once installation is complete, go to your autoexec.bat file
and put: SET MYSQL_HOME=C:mysql
SET PATH =%MYSQL_HOME%bin;%PATH%
-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:mysqlbin> mysqld --install //installs the service
C:mysqlbin> NET START MYSQL //start the mysql server
Connecting to the MySQL Server
• SYNTAX: mysql -h host -u user -p
<< EXAMPLE >>
C:mysqlbin> mysql –h localhost –u root –p
NOTE: THE DEFAULT PASSWORD FOR ROOT IS BLANK !!!
Changing “ROOT” password
 GET USER FIRST:
C:mysqlbin> mysql -u root mysql
 CHANGE PASSWORD SYNTAX:
mysql> UPDATE user SET Password=PASSWORD('new_password')
WHERE user='root';
mysql> FLUSH PRIVILEGES;
DON NOT FORGET THE “ ; “ semi-colon
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/MySQLCC/mysqlcc-
0.9.4-win32.zip/from/http://mysql.orst.edu/
• Unzip mysqlcc-0.9.4-win32.zip and install:
• 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.
Hack the GUI on your own time!
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.
Interfacing with Java: Example Code
My sql essentials

More Related Content

What's hot

Apache ds building_from_source
Apache ds building_from_sourceApache ds building_from_source
Apache ds building_from_source
mervettt
 
Resources and providers chef conf 2013
Resources and providers chef conf 2013Resources and providers chef conf 2013
Resources and providers chef conf 2013
rosekolodny
 

What's hot (20)

Chef
ChefChef
Chef
 
How to install and configure lamp (linux,apache mysql mariadb,php) with jooml...
How to install and configure lamp (linux,apache mysql mariadb,php) with jooml...How to install and configure lamp (linux,apache mysql mariadb,php) with jooml...
How to install and configure lamp (linux,apache mysql mariadb,php) with jooml...
 
Elastic search
Elastic searchElastic search
Elastic search
 
Links todwnload
Links todwnloadLinks todwnload
Links todwnload
 
Lamp introduction in Fedora
Lamp introduction in FedoraLamp introduction in Fedora
Lamp introduction in Fedora
 
Intalacion de owncloud
Intalacion de owncloudIntalacion de owncloud
Intalacion de owncloud
 
MySql cheat sheet
MySql cheat sheetMySql cheat sheet
MySql cheat sheet
 
Maven: Mule esb plugin
Maven: Mule esb pluginMaven: Mule esb plugin
Maven: Mule esb plugin
 
L5 swagger
L5 swaggerL5 swagger
L5 swagger
 
Apache ds building_from_source
Apache ds building_from_sourceApache ds building_from_source
Apache ds building_from_source
 
Visual Programming Framework for Unity - UniFlow のご紹介
Visual Programming Framework for Unity - UniFlow のご紹介Visual Programming Framework for Unity - UniFlow のご紹介
Visual Programming Framework for Unity - UniFlow のご紹介
 
Elastic Beanstalk 이용한 Django 배포
Elastic Beanstalk 이용한 Django 배포 Elastic Beanstalk 이용한 Django 배포
Elastic Beanstalk 이용한 Django 배포
 
Mysql
Mysql Mysql
Mysql
 
Sql installation
Sql installationSql installation
Sql installation
 
Debian quality assurance systems – What can MariaDB developers learn from them?
Debian quality assurance systems – What can MariaDB developers learn from them?Debian quality assurance systems – What can MariaDB developers learn from them?
Debian quality assurance systems – What can MariaDB developers learn from them?
 
Jones_Lamp_Tutorial
Jones_Lamp_TutorialJones_Lamp_Tutorial
Jones_Lamp_Tutorial
 
Setting up MySQL Replication Cluster in Kubernetes
Setting up MySQL Replication Cluster in KubernetesSetting up MySQL Replication Cluster in Kubernetes
Setting up MySQL Replication Cluster in Kubernetes
 
Resources and providers chef conf 2013
Resources and providers chef conf 2013Resources and providers chef conf 2013
Resources and providers chef conf 2013
 
Bugzilla installation guide
Bugzilla installation guideBugzilla installation guide
Bugzilla installation guide
 
MariaDB in Debian and Ubuntu: The next million users
MariaDB in Debian and Ubuntu: The next million usersMariaDB in Debian and Ubuntu: The next million users
MariaDB in Debian and Ubuntu: The next million users
 

Viewers also liked (8)

Design Document
Design DocumentDesign Document
Design Document
 
Game design for beginners
Game design for beginnersGame design for beginners
Game design for beginners
 
Intro to my sql
Intro to my sqlIntro to my sql
Intro to my sql
 
Unreal gaming design kit basic concepts
Unreal gaming design kit  basic conceptsUnreal gaming design kit  basic concepts
Unreal gaming design kit basic concepts
 
Android development-workshop-v2-1228043706544191-8
Android development-workshop-v2-1228043706544191-8Android development-workshop-v2-1228043706544191-8
Android development-workshop-v2-1228043706544191-8
 
Android Development project
Android Development projectAndroid Development project
Android Development project
 
Extracts from Game Design Document
Extracts from Game Design DocumentExtracts from Game Design Document
Extracts from Game Design Document
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving Cars
 

Similar to My sql essentials

R hive tutorial supplement 2 - Installing Hive
R hive tutorial supplement 2 - Installing HiveR hive tutorial supplement 2 - Installing Hive
R hive tutorial supplement 2 - Installing Hive
Aiden Seonghak Hong
 
How to install wordpress on wampserver
How to install wordpress on wampserverHow to install wordpress on wampserver
How to install wordpress on wampserver
shreyakp
 
Bugzilla Installation Process
Bugzilla Installation ProcessBugzilla Installation Process
Bugzilla Installation Process
Vino Harikrishnan
 
Serving Moodle Presentation
Serving Moodle PresentationServing Moodle Presentation
Serving Moodle Presentation
webhostingguy
 

Similar to My sql essentials (20)

Raj mysql
Raj mysqlRaj mysql
Raj mysql
 
instaling
instalinginstaling
instaling
 
instaling
instalinginstaling
instaling
 
instaling
instalinginstaling
instaling
 
instaling
instalinginstaling
instaling
 
MySQL 8.0.21 - New Features Summary
MySQL 8.0.21 - New Features SummaryMySQL 8.0.21 - New Features Summary
MySQL 8.0.21 - New Features Summary
 
Oracle autovue
Oracle autovueOracle autovue
Oracle autovue
 
Jffnms Manual
Jffnms ManualJffnms Manual
Jffnms Manual
 
Build MySQL virtual enviroment
Build MySQL virtual enviromentBuild MySQL virtual enviroment
Build MySQL virtual enviroment
 
R hive tutorial supplement 2 - Installing Hive
R hive tutorial supplement 2 - Installing HiveR hive tutorial supplement 2 - Installing Hive
R hive tutorial supplement 2 - Installing Hive
 
How to install wordpress on wampserver
How to install wordpress on wampserverHow to install wordpress on wampserver
How to install wordpress on wampserver
 
Mysql ppt
Mysql pptMysql ppt
Mysql ppt
 
PHP environment setup installation
PHP environment setup installation PHP environment setup installation
PHP environment setup installation
 
Bugzilla Installation Process
Bugzilla Installation ProcessBugzilla Installation Process
Bugzilla Installation Process
 
Hdf installing-hdf
Hdf installing-hdfHdf installing-hdf
Hdf installing-hdf
 
Getting started with my sql
Getting started with my sqlGetting started with my sql
Getting started with my sql
 
Set up dev environment
Set up dev environmentSet up dev environment
Set up dev environment
 
Creating a full stack web app with python, npm, webpack and react
Creating a full stack web app with python, npm, webpack and reactCreating a full stack web app with python, npm, webpack and react
Creating a full stack web app with python, npm, webpack and react
 
Serving Moodle Presentation
Serving Moodle PresentationServing Moodle Presentation
Serving Moodle Presentation
 
My sql administration
My sql administrationMy sql administration
My sql administration
 

Recently uploaded

TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Microsoft BitLocker Bypass Attack Method.pdf
Microsoft BitLocker Bypass Attack Method.pdfMicrosoft BitLocker Bypass Attack Method.pdf
Microsoft BitLocker Bypass Attack Method.pdf
Overkill Security
 

Recently uploaded (20)

Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Microsoft BitLocker Bypass Attack Method.pdf
Microsoft BitLocker Bypass Attack Method.pdfMicrosoft BitLocker Bypass Attack Method.pdf
Microsoft BitLocker Bypass Attack Method.pdf
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 

My sql essentials

  • 2. Installing MySQL  Download MySQL 4.0.17 at: http://www.mysql.com/get/Downloads/MySQL-4.0/mysql-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_HOME=C:mysql SET PATH =%MYSQL_HOME%bin;%PATH% -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:mysqlbin> mysqld --install //installs the service C:mysqlbin> NET START MYSQL //start the mysql server
  • 4. Connecting to the MySQL Server • SYNTAX: mysql -h host -u user -p << EXAMPLE >> C:mysqlbin> mysql –h localhost –u root –p NOTE: THE DEFAULT PASSWORD FOR ROOT IS BLANK !!!
  • 5. Changing “ROOT” password  GET USER FIRST: C:mysqlbin> mysql -u root mysql  CHANGE PASSWORD SYNTAX: mysql> UPDATE user SET Password=PASSWORD('new_password') WHERE user='root'; mysql> 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/MySQLCC/mysqlcc- 0.9.4-win32.zip/from/http://mysql.orst.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