Cd "Program Files (x86)"


Download 272.59 Kb.
Sana11.12.2021
Hajmi272.59 Kb.
#497066
Bog'liq
21-22-23-LAB
18.SONNING DARAJASI. SONNING KVADRATI VA KUBI, O‘RQ-637 23.09.2020, Dima, malumotlar bazasini boshqarish tizimi, 536b867a7c13c, 536b867a7c13c, Интерфаол технологиялар, 1, МИ мавзулари (2), МИ мавзулари (2), Komp Grafikasi asoslari, Berdaq nomidagi qoraqalpoq davlat universiteti, cyber, 180 буйрук 2020













C:\>cd "Program Files (x86)"

C:\Program Files (x86)>cd MySQL

C:\Program Files (x86)\MySQL>cd "MySQL Server 5.1"

C:\Program Files (x86)\MySQL\MySQL Server 5.1>cd bin

C:\Program Files (x86)\MySQL\MySQL Server 5.1\bin>mysql -u asilbek -p

Enter password: ***

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 7

Server version: 5.1.51-community MySQL Community Server (GPL)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.

This software comes with ABSOLUTELY NO WARRANTY. This is free software,

and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;

+--------------------------------+

| Database |

+--------------------------------+

| information_schema |

| harbiy_okrug_axborot_tizimi_mb |

+--------------------------------+

2 rows in set (0.00 sec)

mysql> use harbiy_okrug_axborot_tizimi_mb;

Database changed

mysql> select * from qism;

+-------------+------------+---------------+-------------+--------------+

| QISM_RAQAMI | JOYLASHUVI | JOYLASHTIRISH | QOSHIN_TURI | ROTALAR_SONI |

+-------------+------------+---------------+-------------+--------------+

| 1 | fargona | qoqon | tank | 100 |

| 2 | andijon | bogdod | hujum | 200 |

| 3 | namangan | buvayda | hujum | 300 |

| 4 | samarqand | qoqon | tank | 400 |

+-------------+------------+---------------+-------------+--------------+

4 rows in set (0.00 sec)

mysql> create table Asilbekl

-> (id int,

-> fam varchar(20),

-> ism varchar(20));

ERROR 1142 (42000): CREATE command denied to user 'asilbek'@'localhost' for table 'asilbekl'

mysql> exit

Bye

C:\Program Files (x86)\MySQL\MySQL Server 5.1\bin>mysql -u asadbek -p



Enter password: ***

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 8

Server version: 5.1.51-community MySQL Community Server (GPL)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.

This software comes with ABSOLUTELY NO WARRANTY. This is free software,

and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use kutubxona_axborot_tizimi;

Database changed

mysql> show tables;

+------------------------------------+

| Tables_in_kutubxona_axborot_tizimi |

+------------------------------------+

| k_fondi |

| k_new |

| k_new2 |

| kutubxona |

+------------------------------------+

4 rows in set (0.00 sec)





mysql> create user 'asilbek'@'localhost' identifiet by '777';

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'identifiet by '777'' at line 1

mysql> create user 'asilbek'@'localhost' identified by '777';

Query OK, 0 rows affected (0.36 sec)

mysql> grant select on harbiy_okrug_axborot_tizimi_mb.* to 'asilbek'@'localhost';

Query OK, 0 rows affected (0.00 sec)

mysql> grant create on harbiy_okrug_axborot_tizimi_mb.* to 'asilbek'@'localhost';

Query OK, 0 rows affected (0.00 sec)

mysql> grant drope, update, delete, drop on harbiy_okrug_axborot_tizimi_mb.* to 'asilbek'@'localhost';

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'drope, update, delete, drop on harbiy_okrug_axborot_tizimi_mb.* to 'asilbek'@'lo' at line 1

mysql> grant update, delete, drop on harbiy_okrug_axborot_tizimi_mb.* to 'asilbek'@'localhost';

Query OK, 0 rows affected (0.00 sec)

mysql> create user 'asadbek'@'localhost' identified by'777';

Query OK, 0 rows affected (0.00 sec)

mysql> grant all privileges on kutubxona_axborot_tizimi.* to 'asadbek'@'localhost';

Query OK, 0 rows affected (0.00 sec)

mysql> use mysql;

Database changed

mysql> select host, user , password from user;

+-----------+---------+-------------------------------------------+

| host | user | password |

+-----------+---------+-------------------------------------------+

| localhost | root | |

| 127.0.0.1 | root | |

| localhost | | |

| localhost | asilbek | *E8D868B7DA46FC9F996DC761C1AE01754A4447D5 |

| localhost | asadbek | *E8D868B7DA46FC9F996DC761C1AE01754A4447D5 |

+-----------+---------+-------------------------------------------+

5 rows in set (0.00 sec)

mysql> show databases;

+--------------------------------+

| Database |

+--------------------------------+

| information_schema |

| ferrr |

| harbiy_okrug_axborot_tizimi_mb |

| kutubxona_axborot_tizimi |

| mysql |

| supermarket_axborot_tizimi |

+--------------------------------+

6 rows in set (0.00 sec)



mysql> use
Download 272.59 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2022
ma'muriyatiga murojaat qiling