1 / 21

MySQL and PHPMyAdmin

MySQL and PHPMyAdmin. 1. Make sure your MySQL service is running. If using XAMPP, open the control panel. If the button for MySQL says Start, click it to start the service. 2. Open PHPMyAdmin (PMA) by clicking the Admin button or by navigating a browser to http://localhost/phpmyadmin. 3.

brewerc
Download Presentation

MySQL and PHPMyAdmin

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. MySQL and PHPMyAdmin 1

  2. Make sure your MySQL service is running. If using XAMPP, open the control panel. If the button for MySQL says Start, click it to start the service. 2

  3. Open PHPMyAdmin (PMA) by clicking the Admin button or by navigating a browser to http://localhost/phpmyadmin 3

  4. If needed, resolve the root having no password issue. I followed Method 2 found at http://veerasundar.com/blog/2009/01/how-to-change-the-root-password-for-mysql-in-xampp/ 4

  5. Method 2 User='root' UPDATE mysql.user SET mysql.user.Password=PASSWORD('secret') WHERE mysql.user.User='root' 5

  6. Restart • If you have changed the root user password in two places, then you may need to close the browser, stop the MySQL server, restart the server, and return to the Admin (PHPMyAdmin a.k.a. PMA) page

  7. Create a new database by clicking on the Databases tab 7

  8. Where it says Create database, enter a name and click on the Create button 8

  9. Check your new database and click on the Check Privileges link 9

  10. Under New click on the Add user link 10

  11. Enter a username, change host to localhost and enter a password (twice) 11

  12. Scroll down. Note the Grant all privileges on database “dbstatcapital” is pre-selected. Click Go. 12

  13. This database will have a single table with state-capital data like that found at http://en.wikipedia.org/wiki/List_of_capitals_in_the_United_States Let us say that we will use the Abbr. column as the primary key that will uniquely identify each row/record. Note there are ten columns. 14

  14. Create a table to hold the data. Give it a name. Select a number of columns and click Go. 15

  15. Start filling in the column names. Make the Abbr the primary key under the Index drop-down. 16

  16. Finish entering the columns. Enter appropriate types. Click Save. At first I thought Year was the appropriate type for StateDate and CapitalDate. But the dates were too early to be easily accepted at years. 17

  17. Result of saved file 18

  18. Add data by going to the Import tab. Browse for the csv file provided. Choose CSV from the format dropdown. Scroll down and click Go. Changed automatically for me 19

  19. Result of import 20

  20. Looking at results in Browse tab. 21

More Related