Difference between revisions of "SRA840 Lab7"
Milton.paiva (talk | contribs) (→Milton) |
Milton.paiva (talk | contribs) (→Milton) |
||
Line 4: | Line 4: | ||
1.1 Give privileges: | 1.1 Give privileges: | ||
− | grant all on wordpress.* to wordpress@localhost identified by 'password'; | + | mysql> grant all on wordpress.* to wordpress@localhost identified by 'password'; |
1.2 Remove privileges: | 1.2 Remove privileges: | ||
− | flush privileges; | + | mysql> flush privileges; |
2. create a table | 2. create a table | ||
− | create table ''table_name'' (name char(20)); | + | mysql> create table ''table_name'' (name char(20)); |
3. insert a few records into the table you created | 3. insert a few records into the table you created | ||
− | insert into ''table_name'' values('milton'); | + | mysql> insert into ''table_name'' values('milton'); |
4. select some of the records in the table you created | 4. select some of the records in the table you created | ||
− | select name from ''table_name''; | + | mysql> select name from ''table_name''; |
5. change some of the records into the table you created | 5. change some of the records into the table you created | ||
− | + | mysql> update mxx set name='john' where name='milton'; | |
6. delete records from the table you created | 6. delete records from the table you created |
Revision as of 16:35, 11 April 2009
Milton
1. give and remove user rights
1.1 Give privileges:
mysql> grant all on wordpress.* to wordpress@localhost identified by 'password';
1.2 Remove privileges:
mysql> flush privileges;
2. create a table
mysql> create table table_name (name char(20));
3. insert a few records into the table you created
mysql> insert into table_name values('milton');
4. select some of the records in the table you created
mysql> select name from table_name;
5. change some of the records into the table you created
mysql> update mxx set name='john' where name='milton';
6. delete records from the table you created