author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Fri, 11 Dec 2015 18:30:50 +0200 | |
changeset 1811 | 072cc8a704ce |
parent 1810 | 752c192306ff |
child 1836 | 4864231db031 |
permissions | -rw-r--r-- |
1809 | 1 |
.. -*- coding: utf-8; -*- |
2 |
.. include:: HEADER.rst |
|
3 |
||
4 |
================ |
|
5 |
MySQL/MariaBD. |
|
6 |
================ |
|
7 |
.. contents:: |
|
8 |
||
9 |
SQL clients. |
|
10 |
============ |
|
11 |
||
1810 | 12 |
https://mariadb.com/kb/en/mariadb/clients-and-utilities/ |
13 |
Clients and Utilities. |
|
14 |
https://mariadb.com/kb/en/mariadb/graphical-and-enhanced-clients/ |
|
15 |
Graphical and Enhanced Clients. |
|
16 |
||
1809 | 17 |
mysql. |
18 |
------ |
|
19 |
||
20 |
Official client. Install ``mariadb-client`` package - ``mysql`` utility |
|
21 |
will be installed with dependent package. |
|
22 |
||
23 |
Usage:: |
|
24 |
||
25 |
$ mysql -u $USER -p |
|
26 |
Enter password: <== Type password. |
|
27 |
||
28 |
mycli. |
|
29 |
------ |
|
30 |
||
31 |
Python command line client with completion. Usage:: |
|
32 |
||
33 |
$ mycli -u $USER |
|
34 |
Password: <== Type password. |
|
35 |
||
1811
072cc8a704ce
List databases, tables, columns.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1810
diff
changeset
|
36 |
List databases, tables, columns. |
072cc8a704ce
List databases, tables, columns.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1810
diff
changeset
|
37 |
================================ |
072cc8a704ce
List databases, tables, columns.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1810
diff
changeset
|
38 |
:: |
072cc8a704ce
List databases, tables, columns.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1810
diff
changeset
|
39 |
|
072cc8a704ce
List databases, tables, columns.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1810
diff
changeset
|
40 |
$ mysql -u $USER -p |
072cc8a704ce
List databases, tables, columns.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1810
diff
changeset
|
41 |
Enter password: <== Type password. |
072cc8a704ce
List databases, tables, columns.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1810
diff
changeset
|
42 |
|
072cc8a704ce
List databases, tables, columns.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1810
diff
changeset
|
43 |
SHOW DATABASES; |
072cc8a704ce
List databases, tables, columns.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1810
diff
changeset
|
44 |
|
072cc8a704ce
List databases, tables, columns.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1810
diff
changeset
|
45 |
USE mysql; |
072cc8a704ce
List databases, tables, columns.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1810
diff
changeset
|
46 |
MariaDB [mysql]> SHOW TABLES; |
072cc8a704ce
List databases, tables, columns.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1810
diff
changeset
|
47 |
|
072cc8a704ce
List databases, tables, columns.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1810
diff
changeset
|
48 |
MariaDB [mysql]> SHOW COLUMNS FROM user; |
072cc8a704ce
List databases, tables, columns.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1810
diff
changeset
|
49 |
|
072cc8a704ce
List databases, tables, columns.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1810
diff
changeset
|
50 |
MariaDB [mysql]> DESCRIBE user; |
072cc8a704ce
List databases, tables, columns.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1810
diff
changeset
|
51 |
|
072cc8a704ce
List databases, tables, columns.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1810
diff
changeset
|
52 |
MariaDB [mysql]> SHOW STATUS; |
072cc8a704ce
List databases, tables, columns.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1810
diff
changeset
|
53 |
|
072cc8a704ce
List databases, tables, columns.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1810
diff
changeset
|
54 |
MariaDB [mysql]> SHOW CREATE DATABASE mysql; |
072cc8a704ce
List databases, tables, columns.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1810
diff
changeset
|
55 |
MariaDB [mysql]> SHOW CREATE TABLE user; |
072cc8a704ce
List databases, tables, columns.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1810
diff
changeset
|
56 |
|
072cc8a704ce
List databases, tables, columns.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1810
diff
changeset
|
57 |
MariaDB [mysql]> SHOW GRANTS; |
072cc8a704ce
List databases, tables, columns.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1810
diff
changeset
|
58 |
|
072cc8a704ce
List databases, tables, columns.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1810
diff
changeset
|
59 |
MariaDB [mysql]> SHOW WARNINGS; |
072cc8a704ce
List databases, tables, columns.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1810
diff
changeset
|
60 |
MariaDB [mysql]> SHOW ERRORS; |
072cc8a704ce
List databases, tables, columns.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1810
diff
changeset
|
61 |