mysql 符_mysql命令操作符
Microsoft Windows XP [版本5.1.2600]
(C)版權所有1985-2001 Microsoft Corp.
C:\Documents and Settings\Administrator>mysql -uroot -p
Enter password: ****
Welcome to the MySQL monitor.Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 5.0.27-community-nt
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>show databases;
+--------------------+
| Database|
+--------------------+
| information_schema |
| mysql|
| test|
+--------------------+
3rows in set (0.02 sec)
mysql>use mysql;
Database changed
mysql> show tables;
+---------------------------+
| Tables_in_mysql|
+---------------------------+
| columns_priv|
| db|
| func|
| help_category|
| help_keyword|
| help_relation|
| help_topic|
| host|
| proc|
| procs_priv|
| tables_priv|
| time_zone|
| time_zone_leap_second|
| time_zone_name|
| time_zone_transition|
| time_zone_transition_type |
| user|
+---------------------------+
17 rows in set (0.00 sec)
mysql>select * from user;
+-----------+------+-------------------------------------------+-------------+--
-----------+-------------+-------------+-------------+-----------+-------------+
---------------+--------------+-----------+------------+-----------------+------
------+------------+--------------+------------+-----------------------+--------
----------+--------------+-----------------+------------------+-----------------
-+----------------+---------------------+--------------------+------------------
+----------+------------+-------------+--------------+---------------+----------
---+-----------------+----------------------+
| Host| User | Password| Select_priv | I
nsert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv |
Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | Index
_priv | Alter_priv | Show_db_priv | Super_priv | Create_tmp_table_priv | Lock_ta
bles_priv | Execute_priv | Repl_slave_priv | Repl_client_priv | Create_view_priv
| Show_view_priv | Create_routine_priv | Alter_routine_priv | Create_user_priv
| ssl_type | ssl_cipher | x509_issuer | x509_subject | max_questions | max_updat
es | max_connections | max_user_connections |
+-----------+------+-------------------------------------------+-------------+--
-----------+-------------+-------------+-------------+-----------+-------------+
---------------+--------------+-----------+------------+-----------------+------
------+------------+--------------+------------+-----------------------+--------
----------+--------------+-----------------+------------------+-----------------
-+----------------+---------------------+--------------------+------------------
+----------+------------+-------------+--------------+---------------+----------
---+-----------------+----------------------+
| localhost | root | *81F5E21E35407D884A6CD4A731AEBFB6AF209E1B | Y| Y
| Y| Y| Y| Y| Y|
Y| Y| Y| Y| Y| Y
| Y| Y| Y| Y| Y
| Y| Y| Y| Y
| Y| Y| Y| Y
|| |||0 |
0 |0 |0 |
+-----------+------+-------------------------------------------+-------------+--
-----------+-------------+-------------+-------------+-----------+-------------+
---------------+--------------+-----------+------------+-----------------+------
------+------------+--------------+------------+-----------------------+--------
----------+--------------+-----------------+------------------+-----------------
-+----------------+---------------------+--------------------+------------------
+----------+------------+-------------+--------------+---------------+----------
---+-----------------+----------------------+
1 row in set (0.00 sec)
mysql>create database ch07;
Query OK, 1 row affected (0.00 sec)
mysql> use ch07;
Database changed
mysql>create table test(
-> id int(10) unsigned not null auto_increment,
-> username varchar(20) not null,
-> password varchar(20) not null,
-> age int(10),
-> primary key(id)
-> );
Query OK, 0 rows affected (0.06 sec)
mysql>select * from test;
Empty set (0.00 sec)
mysql>set names gbk;//想插中文,先輸入
Query OK, 0 rows affected (0.03 sec)
mysql>insert into test values(
-> null,'說明','123456',25);
Query OK, 1 row affected (0.06 sec)
mysql>insert into test values(
-> null,'lisi','說明.txt',null);
Query OK, 1 row affected (0.02 sec)
mysql>select * from test;
+----+----------+----------+------+
| id | username | password | age|
+----+----------+----------+------+
|1 |說明| 123456|25 |
|2 | lisi|說明.txt | NULL |
+----+----------+----------+------+
2 rows in set (0.00 sec)
mysql>exit
總結
以上是生活随笔為你收集整理的mysql 符_mysql命令操作符的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 3种设计模式java小程序_Java设计
- 下一篇: linux下安装mysql57_Linu