Menü +

find ./ -type f -name '*source-string*'

SQL-Datenverwaltung

yum install mysql-server mysql-client
apt-get install mysql-server mysql-client

mysql --user=root -h localhost

mysql --user=root -p

mysql> status;
/*
--------------
mysql  Ver 14.14 Distrib 5.5.43, for debian-linux-gnu (x86_64) using readline 6.3

Connection id:          6
Current database:
Current user:           [email protected]
SSL:                    Not in use
Current pager:          stdout
Using outfile:          ''
Using delimiter:        ;
Server version:         5.5.43-0ubuntu0.14.04.1 (Ubuntu)
Protocol version:       10
Connection:             Localhost via UNIX socket
Server characterset:    latin1
Db     characterset:    latin1
Client characterset:    utf8
Conn.  characterset:    utf8
UNIX socket:            /var/run/mysqld/mysqld.sock
Uptime:                 1 day 5 hours 12 sec

Threads: 1  Questions: 5  Slow queries: 0  Opens: 33  Flush tables: 1 \
Open tables: 26  Queries per second avg: 0.000
--------------
*/
mysql> help contents;
/*
You asked for help about help category: "Contents"
For more information, type 'help <item>', where <item> is one of the following
categories:
   Account Management
   Administration
   Compound Statements
   Data Definition
   Data Manipulation
   Data Types
   Functions
   Functions and Modifiers for Use with GROUP BY
   Geographic Features
   Help Metadata
   Language Structure
   Plugins
   Procedures
   Storage Engines
   Table Maintenance
   Transactions
   User-Defined Functions
   Utility
*/
mysql> help Utility
/*
You asked for help about help category: "Utility"
For more information, type 'help <item>', where <item> is one of the following
topics:
   EXPLAIN
   HELP STATEMENT
   USE
*/

Datenbenk erschtellen.

mysql> show databases;
/*
+--------------------+
| Database           |
+--------------------+
| wiki               |
+--------------------+
50 rows in set (0.05 sec)
*/
mysql> CREATE DATABASE db_name;
/*     Query OK, 1 row affected (0.00 sec) */
mysql> USE db_name;
/*     Database changed */
mysql> CREATE TABLE table_name (
    -> id INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
    -> column_name_0 VARCHAR(128),
    -> column_name_1 VARCHAR(128),
    -> column_name_2 VARCHAR(32),
    -> column_name_3 VARCHAR(32)
    -> )
/*     Query OK, 0 rows affected (0.02 sec)*/

mysql> INSERT INTO
    -> table_name (id, column_name_0, column_name_1, column_name_2, column_name_3)
    -> VALUES (1, 'Vorname0', 'Nachname0', '030', '1234567');
/*     Query OK, 1 row affected (0.02 sec)*/

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.