mysql_1
时间:2021-07-01 10:21:17
帮助过:2人阅读
+---------------------+| NOW() |+---------------------+| 2015-11-07 10:29:04 |+---------------------+1 row in set (0.00 sec)mysql> select NOW(),USER(),VERSION();+---------------------+----------------+-----------------+| NOW() | USER() | VERSION() |+---------------------+----------------+-----------------+| 2015-11-07 10:32:18 | root@localhost | 5.5.35-1ubuntu1 |+---------------------+----------------+-----------------+1 row in set (0.00 sec)mysql> select NOW(),USER(),VERSION()\g+---------------------+----------------+-----------------+| NOW() | USER() | VERSION() |+---------------------+----------------+-----------------+| 2015-11-07 10:35:37 | root@localhost | 5.5.35-1ubuntu1 |+---------------------+----------------+-----------------+1 row in set (0.00 sec)mysql> select NOW(),USER(),VERSION()\G*************************** 1. row *************************** NOW(): 2015-11-07 10:35:41 USER(): root@localhostVERSION(): 5.5.35-1ubuntu11 row in set (0.00 sec)取消mysql> select user(), -> now(), -> \cmysql>
创建数据库
mysql> create database sampdb;
Query OK, 1 row affected (0.02 sec)
mysql> select database();
+------------+
| database() |
+------------+
| NULL |
+------------+
1 row in set (0.00 sec)
mysql> use sampdb; $mysql sampdb -u root -p
$mysql -h hostname -u root -p sampdb
mysql> select database();
Database changed
+------------+
| database() |
+------------+
| sampdb |
+------------+
1 row in set (0.00 sec)
mysql_1
标签: