My SQl

2,131 views

Published on

Presentation

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,131
On SlideShare
0
From Embeds
0
Number of Embeds
127
Actions
Shares
0
Downloads
83
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

My SQl

  1. 1. Installing MySQL on Windows Mike Barras (m.barras@its.utexas.edu) Introduction <ul><li>Introduction </li></ul><ul><li>Installing MySQL </li></ul><ul><li>Running MySQL </li></ul><ul><li>Testing with PHP </li></ul><ul><li>Presented by Mike Barras, ITS </li></ul><ul><li>Available online at </li></ul><ul><li>http:// uts.cc.utexas.edu/~mpbarras/php / </li></ul>
  2. 2. Installing MySQL on Windows Mike Barras (m.barras@its.utexas.edu) Introduction <ul><li>Supported 32-bit Windows Platforms (Win32) </li></ul><ul><ul><li>Windows 9x (95/98/ME) </li></ul></ul><ul><ul><li>Windows NT (NT/2000/XP) </li></ul></ul><ul><ul><li>Workstation/Home/Professional </li></ul></ul><ul><li>Server Editions </li></ul>
  3. 3. Installing MySQL on Windows Mike Barras (m.barras@its.utexas.edu) Installing MySQL <ul><li>Example environment </li></ul><ul><ul><li>Windows 2000 Server (SP 3) </li></ul></ul><ul><ul><li>IIS 5.0 </li></ul></ul><ul><ul><li>PHP 4.3.1 </li></ul></ul><ul><ul><li>MySQL 4.0.12 </li></ul></ul><ul><li>Note: IIS (Web Server) and PHP (Script engine) are </li></ul><ul><li>NOT required to install or run MySQL. </li></ul>
  4. 4. Installing MySQL on Windows Mike Barras (m.barras@its.utexas.edu) Installing MySQL Step 1: Download the most recent version of the MySQL for Windows installer from http://www.mysql.org/ , and run it. Select the directory to which you would like to install MySQL (c:mysql).
  5. 5. Installing MySQL on Windows Mike Barras (m.barras@its.utexas.edu) Installing MySQL <ul><li>Step 2: Select the setup type that you would like to use. The </li></ul><ul><li>“ typical” should be sufficient for just about everybody. It </li></ul><ul><li>installs all items, including: </li></ul><ul><li>The Mysql Servers </li></ul><ul><li>Clients and maint. tools </li></ul><ul><li>Documentation </li></ul><ul><li>Examples and Libraries </li></ul><ul><li>Grants tables and core </li></ul><ul><li>files </li></ul>
  6. 6. Installing MySQL on Windows Mike Barras (m.barras@its.utexas.edu) Installing MySQL Step 3: That’s it! Click finish and you’re done installing (it really is just that simple)
  7. 7. Installing MySQL on Windows Mike Barras (m.barras@its.utexas.edu) Running MySQL You must manually start MySQL the first time. c:mysqlinwinmysqladmin.exe You will be prompted to create an admin username and Password. This is the login information for the admin tool, not any specific database or table. Once the admin account is created, the server will be running (either as a program in Win 9x or as a service in NT) and will run each time you start Windows. The “traffic light” system tray icon shows you its working.
  8. 8. Installing MySQL on Windows Mike Barras (m.barras@its.utexas.edu) Running MySQL Run the MySQL command interface by executing c:mysqlinmysql.exe Type show databases; to See the current databases Configured on the server. By default, “mysql” and “ test” should be there. Type use test; to specify that database.
  9. 9. Installing MySQL on Windows Mike Barras (m.barras@its.utexas.edu) Running MySQL Let’s create a table. Type show tables; to see Currently defined tables in “ test”. Issue create table command to create a table. Now run show tables; again to verify what you’ve done. create table tablename ( column datatype );
  10. 10. Installing MySQL on Windows Mike Barras (m.barras@its.utexas.edu) Running MySQL Insert some data into the table you’ve just created using the “insert into” SQL command. Verify the insert by “selecting” the information back out. insert into tablename ( field1, field2,… ) values ( value1, value2,… ); select [list of fieldnames or *] from tablename;
  11. 11. Installing MySQL on Windows Mike Barras (m.barras@its.utexas.edu) Testing with PHP The true measure of success (requires PHP and web server) Put it all together. PHP Functions: mysql_connect( host[,user,pass] ) mysql_select_db( database ) mysql_query( SQL stmt ); mysql_close( database handle );
  12. 12. Installing MySQL on Windows Mike Barras (m.barras@its.utexas.edu) Testing with PHP
  13. 13. Installing PHP on Windows Useful Links This Presentation http:// uts.cc.utexas.edu/~mpbarras/php / Download MySQL http://www.mysql.com/downloads/mysql-4.0.html Installation Documentation http://www.mysql.com/documentation/index.html PHP reference for MySQL functions http://www.php.net/manual/en/ref.mysql.php Mike Barras (m.barras@its.utexas.edu)

×