MySQL Tutorial

Reviews
Shared by: techmaster
Stats
views:
316
rating:
not rated
reviews:
0
posted:
10/28/2008
language:
UNKNOWN
pages:
0
MySQL Tutorial By: John Bouchard II Bruce Harris 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:\mysql\bin> mysqld --install //installs the service C:\mysql\bin> NET START MYSQL //start the mysql server Connecting to the MySQL Server • SYNTAX: mysql -h host -u user -p << EXAMPLE >> C:\mysql\bin> mysql –h localhost –u root –p NOTE: THE DEFAULT PASSWORD FOR ROOT IS BLANK !!! Changing “ROOT” password  GET USER FIRST: C:\mysql\bin> 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/mysqlcc0.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

Related docs
MySQL Tutorial
Views: 111  |  Downloads: 32
MySQL Tutorial
Views: 221  |  Downloads: 83
Mysql tutorial
Views: 7  |  Downloads: 1
mysql-tutorial
Views: 372  |  Downloads: 23
PHP and Mysql
Views: 475  |  Downloads: 16
Mysql
Views: 923  |  Downloads: 106
mysql_tutorial
Views: 44  |  Downloads: 10
Java MySql Tutorial
Views: 5  |  Downloads: 2
MySQL tutorial
Views: 9  |  Downloads: 1
tutorial_mysql
Views: 27  |  Downloads: 4
PHP/MySQL Tutorial
Views: 537  |  Downloads: 77
PHP/MySQL Tutorial
Views: 8084  |  Downloads: 151
Other docs by techmaster
childtrafficking
Views: 112  |  Downloads: 2
bcf00260-usen-plate-design
Views: 47  |  Downloads: 0
css1-sheet-7nov2000
Views: 63  |  Downloads: 1
corvinus_evaluation
Views: 48  |  Downloads: 0
Careers_in_Multimedia_and_Graphic_Design
Views: 239  |  Downloads: 11
Brainstorming_Movies
Views: 231  |  Downloads: 15
code_conduct
Views: 149  |  Downloads: 3
CodeOfEthics
Views: 31  |  Downloads: 0
COMP60321
Views: 68  |  Downloads: 0
change_info
Views: 130  |  Downloads: 0
coct
Views: 34  |  Downloads: 0
CSSDP_solutionsheet
Views: 44  |  Downloads: 0
Curatorial Theme
Views: 71  |  Downloads: 0
coalesc
Views: 122  |  Downloads: 1
Codian-TMC-Award-Press-Release-Feb07
Views: 59  |  Downloads: 0