1 / 16

Database Project: MySQL

Database Project: MySQL. TA: Jansen Cohoon Office: 208 Butler Email: jec9@msstate.edu. XWin 8.0. XWin allows a user to run commands remotely on a Unix, Solaris or Linux server. A fancier telnet. It is available for free from the ITS website.

Télécharger la présentation

Database Project: MySQL

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Database Project: MySQL TA: Jansen Cohoon Office: 208 Butler Email: jec9@msstate.edu

  2. XWin 8.0 • XWin allows a user to run commands remotely on a Unix, Solaris or Linux server. • A fancier telnet. • It is available for free from the ITS website. • It is a great tool to have and I recommend it to everyone.

  3. MySQL Accounts • Everyone has a MySQL account available from Pluto. • To login use mysql –u <userid> -p • You will then be prompted for a password. • Your default password is ab1234. • To change password use: set password=password("newpassword");

  4. MySQL Account • Everyone starts with their own database named for their <userid>. • This should be sufficient for the class and project. • You will create numerous tables though. • To start working in your database use: USE <userid>;

  5. MySQL Account • Some useful commands: • SHOW DATABASES; • SHOW TABLES; • DESCRIBE <table>; • CREATE TABLE <table>; • DROP TABLE <table>; • QUIT;

  6. Database Project: PHP

  7. PHP • PHP – Hypertext Preprocessor • No need to run a server. • Already installed. • C and Perl “ish” language syntax • PHP has built in MySQL support just like Java. • It is a little tricky with Oracle.

  8. PHP • PHP is a scripting language. • To incorporate PHP into a website you use the tags <?php and ?>. • With these tags you can mix PHP with HTML and get dynamic web content.

  9. PHP Example • <html> <head>  <title>PHP Test</title> </head> <body> <?php echo '<p>Hello World</p>'; ?>  </body></html> • This would be the contents of test.php

  10. PHP MySQL Example • Go to dbSlide.php • Shows basic PHP/MySQL command structure.

  11. Database Project: Java

  12. Setting Up Tomcat • Detailed instructions are on my website. • They show you how to setup Tomcat on Pluto.

  13. Using JDBC • Seven Basic Steps: • Load the JDBC Driver. • Define the connection. • Establish the connection. • Create the statement object. • Execute the statement object. • Process the results. • Close the connection.

  14. Servlets or Server Pages • You may use either ot the two. • Many people feel that Java Server Pages are easier.

  15. JDBC Driver and URL • Driver: • com.mysql.jdbc.Driver • URL Connection: • jdbc:mysql://localhost/<userid>

  16. Java Server Page • Show add.jsp

More Related