ways to manage db in mysql cs346. six ways to create and insert into tables...
TRANSCRIPT
![Page 1: Ways to manage DB in MySQL cs346. Six ways to CREATE and INSERT INTO tables Modelocalremotelocalremotewindow WhereMysql console Putty; Mysql console Mysql](https://reader036.vdocument.in/reader036/viewer/2022081515/56649ea35503460f94ba7ec0/html5/thumbnails/1.jpg)
Ways to manage DB in MySQL
cs346
![Page 2: Ways to manage DB in MySQL cs346. Six ways to CREATE and INSERT INTO tables Modelocalremotelocalremotewindow WhereMysql console Putty; Mysql console Mysql](https://reader036.vdocument.in/reader036/viewer/2022081515/56649ea35503460f94ba7ec0/html5/thumbnails/2.jpg)
Six ways to CREATE and INSERT INTO tables
Mode local remote local remote window window
Where Mysql console
Putty; Mysql console
Mysql console
Putty; Mysql console
WAMP server icon
Link
command CREATE,INSERT
CREATE, INSERT
Source script; or redirection
Source script; or redirection
http://141.233.176.1/phpmyadmin/
Interactive Batch phpMyAdmin
![Page 3: Ways to manage DB in MySQL cs346. Six ways to CREATE and INSERT INTO tables Modelocalremotelocalremotewindow WhereMysql console Putty; Mysql console Mysql](https://reader036.vdocument.in/reader036/viewer/2022081515/56649ea35503460f94ba7ec0/html5/thumbnails/3.jpg)
1. Local MySQL Console
• Select WAMPSERVER icon• Select MySQL >MySQL Console
![Page 4: Ways to manage DB in MySQL cs346. Six ways to CREATE and INSERT INTO tables Modelocalremotelocalremotewindow WhereMysql console Putty; Mysql console Mysql](https://reader036.vdocument.in/reader036/viewer/2022081515/56649ea35503460f94ba7ec0/html5/thumbnails/4.jpg)
![Page 5: Ways to manage DB in MySQL cs346. Six ways to CREATE and INSERT INTO tables Modelocalremotelocalremotewindow WhereMysql console Putty; Mysql console Mysql](https://reader036.vdocument.in/reader036/viewer/2022081515/56649ea35503460f94ba7ec0/html5/thumbnails/5.jpg)
At the prompt for password, just press return (since I was never asked to enter a password on installation of WAMP on my laptop)
![Page 6: Ways to manage DB in MySQL cs346. Six ways to CREATE and INSERT INTO tables Modelocalremotelocalremotewindow WhereMysql console Putty; Mysql console Mysql](https://reader036.vdocument.in/reader036/viewer/2022081515/56649ea35503460f94ba7ec0/html5/thumbnails/6.jpg)
Now you are at the MySQL Console and may enter MySQL commands/queries
![Page 7: Ways to manage DB in MySQL cs346. Six ways to CREATE and INSERT INTO tables Modelocalremotelocalremotewindow WhereMysql console Putty; Mysql console Mysql](https://reader036.vdocument.in/reader036/viewer/2022081515/56649ea35503460f94ba7ec0/html5/thumbnails/7.jpg)
![Page 8: Ways to manage DB in MySQL cs346. Six ways to CREATE and INSERT INTO tables Modelocalremotelocalremotewindow WhereMysql console Putty; Mysql console Mysql](https://reader036.vdocument.in/reader036/viewer/2022081515/56649ea35503460f94ba7ec0/html5/thumbnails/8.jpg)
2. Remotely via putty to cs346 Linux server
login as: studentUbuntu [email protected]'s password: System information as of Thu Nov 18 16:00:01 CST 2010 System load: 0.0 Memory usage: 13% Processes: 98 Usage of /: 1.3% of 223.56GB Swap usage: 0% Users logged in: 0 Graph this data and manage this system at https://landscape.canonical.com/ 20 packages can be updated.16 updates are security updates. Last login: Wed Nov 17 19:05:07 2010 from h216-170-137-127.applwi.dedicated.stat ic.tds.net System information as of Thu Nov 18 16:00:01 CST 2010
![Page 9: Ways to manage DB in MySQL cs346. Six ways to CREATE and INSERT INTO tables Modelocalremotelocalremotewindow WhereMysql console Putty; Mysql console Mysql](https://reader036.vdocument.in/reader036/viewer/2022081515/56649ea35503460f94ba7ec0/html5/thumbnails/9.jpg)
System load: 0.0 Memory usage: 13% Processes: 98 Usage of /: 1.3% of 223.56GB Swap usage: 0% Users logged in: 0 Graph this data and manage this system at https://landscape.canonical.com/ 20 packages can be updated.16 updates are security updates. student@CS346:~$ /* Now you are in Linux */
student@CS346:~$ mysql -u student -pEnter password:Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 235Server version: 5.0.75-0ubuntu10.3 (Ubuntu) Type 'help;' or '\h' for help. Type '\c' to clear the buffer. Mysql>
/* Now you are in MySQL Console remotely */
![Page 10: Ways to manage DB in MySQL cs346. Six ways to CREATE and INSERT INTO tables Modelocalremotelocalremotewindow WhereMysql console Putty; Mysql console Mysql](https://reader036.vdocument.in/reader036/viewer/2022081515/56649ea35503460f94ba7ec0/html5/thumbnails/10.jpg)
mysql> show databases;+--------------------+| Database |+--------------------+| information_schema || student |+--------------------+2 rows in set (0.00 sec) mysql> use student;
![Page 11: Ways to manage DB in MySQL cs346. Six ways to CREATE and INSERT INTO tables Modelocalremotelocalremotewindow WhereMysql console Putty; Mysql console Mysql](https://reader036.vdocument.in/reader036/viewer/2022081515/56649ea35503460f94ba7ec0/html5/thumbnails/11.jpg)
3. and 4. Batch
• See Lab10 instructions on the “source” command;
• See the slide “Upload_install_bookorama_tables_to_student_cs346_Linux.doc” on Linux redirection
![Page 12: Ways to manage DB in MySQL cs346. Six ways to CREATE and INSERT INTO tables Modelocalremotelocalremotewindow WhereMysql console Putty; Mysql console Mysql](https://reader036.vdocument.in/reader036/viewer/2022081515/56649ea35503460f94ba7ec0/html5/thumbnails/12.jpg)
5. phpMyAdmin on localhost
• Click WAMPSERVER icon• Select phpMyAdmin• A browser window opens with the location:http://localhost/phpmyadmin/
![Page 13: Ways to manage DB in MySQL cs346. Six ways to CREATE and INSERT INTO tables Modelocalremotelocalremotewindow WhereMysql console Putty; Mysql console Mysql](https://reader036.vdocument.in/reader036/viewer/2022081515/56649ea35503460f94ba7ec0/html5/thumbnails/13.jpg)
![Page 14: Ways to manage DB in MySQL cs346. Six ways to CREATE and INSERT INTO tables Modelocalremotelocalremotewindow WhereMysql console Putty; Mysql console Mysql](https://reader036.vdocument.in/reader036/viewer/2022081515/56649ea35503460f94ba7ec0/html5/thumbnails/14.jpg)
6. phpMyAdmin on cs346 WAMP 141.233.176.1
• On a browser window, type inhttp://141.233.176.1/phpmyadmin/• An authentication pop-up appears for
username and password at the cs346 WAMP server
![Page 15: Ways to manage DB in MySQL cs346. Six ways to CREATE and INSERT INTO tables Modelocalremotelocalremotewindow WhereMysql console Putty; Mysql console Mysql](https://reader036.vdocument.in/reader036/viewer/2022081515/56649ea35503460f94ba7ec0/html5/thumbnails/15.jpg)
![Page 16: Ways to manage DB in MySQL cs346. Six ways to CREATE and INSERT INTO tables Modelocalremotelocalremotewindow WhereMysql console Putty; Mysql console Mysql](https://reader036.vdocument.in/reader036/viewer/2022081515/56649ea35503460f94ba7ec0/html5/thumbnails/16.jpg)
phpMyAdmin
• The GUI gives you a way to– SELECT * FROM tablename;– CREATE TABLE– DROP TABLE– etc.
•