1、Linux环境下开启服务
[xxx@localhost ~]$ su
口令:
[xxx@localhost xxxxx]# /etc/init.d/mysqld start
启动 MySQL: [确定]2、登录
[xxx@localhost xxxxx# mysql
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 2
Server version: 5.0.37 Source distributionType "help;" or "h" for help. Type "c" to clear the buffer.mysql>3、显示数据库
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| myDatabase |
| mysql |
| test |
+--------------------+
4 rows in set (0.00 sec)4、显示数据库myDatabase数据库中的表
mysql> use myDatabase;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -ADatabase changed
mysql> show tables;
+----------------------+
| Tables_in_myDatabase |
+----------------------+
| user |
+----------------------+
1 row in set (0.00 sec)mysql> 5、显示表user结构
mysql> describe user;
+-------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+--------------+------+-----+---------+-------+
| userID | int(11) | YES | | NULL | |
| userName | varchar(20) | YES | | NULL | |
| userAddress | varchar(100) | YES | | NULL | |
+-------------+--------------+------+-----+---------+-------+
3 rows in set (0.00 sec)mysql> Ubuntu下的c++连接数据库Linux下安装Oracle客户端相关资讯 linux mysql MySQL教程
- 30分钟带你快速入门MySQL教程 (02月03日)
- MySQL教程:关于I/O内存方面的一些 (01月24日)
- Linux开启MySQL远程连接 (11/22/2014 07:40:48)
| - MySQL教程:关于checkpoint机制 (01月24日)
- Linux下MySQL的简单操作笔记 (08/12/2015 10:50:28)
- Linux下MySQL报Table "xxx" doesn" (11/22/2014 07:37:47)
|
本文评论 查看全部评论 (0)