Ubuntu 下Mysql常用命令
来源:互联网 发布:思迅软件多少钱 编辑:程序博客网 时间:2024/05/22 06:46
启动:sudo /etc/init.d/mysql start
停止:sudo /etc/init.d/mysql stop
重启:sudo /etc/init.d/mysql restart
登录:mysql -u root -p<pwd>
创建用户
CREATE USER <user_name> IDENTIFIED BY '<pwd>;
查看数据库使用字符集
show variables like 'character%';
一、库操作
1、创建数据库命令:create database <数据库名>
例如:建立一个名为test的数据库
mysql> create database test;
2、显示所有的数据库
命令:show databases
mysql> show databases;
3、删除数据库
命令:drop database <数据库名>
例如:删除名为 test的数据库
mysql> drop database test;
4、连接数据库
命令: use <数据库名>
例如:如果test数据库存在,尝试存取它:
mysql> use test;
屏幕提示:Database changed
5、查看当前使用的数据库
mysql> select database();
6、当前数据库包含的表信息:
mysql> show tables;
0 0
- Ubuntu 下 MySql 常用命令
- Ubuntu 下Mysql常用命令
- Ubuntu 下Mysql常用命令
- Ubuntu下MySQL的常用命令
- ubuntu 下mysql的常用命令
- ubuntu 下mysql的常用命令
- ubuntu下mysql的常用命令
- ubuntu下mysql的常用命令
- Ubuntu下MySQL的常用命令
- ubuntu下mysql的常用命令
- ubuntu下mysql的常用命令
- ubuntu下mysql的常用命令
- ubuntu下mysql的常用命令
- ubuntu下mysql的常用命令
- Ubuntu下Mysql常用命令详解
- ubuntu下mysql的常用命令
- ubuntu下mysql的常用命令
- ubuntu下mysql的常用命令
- Python 检查数组元素是否存在 类PHP isset()
- Link inside of input tag
- C++函数模板template
- 非递归的二叉搜索树的中序遍历
- date命令的帮助信息
- Ubuntu 下Mysql常用命令
- Change placeholder text without jQuery
- 什么是Spring
- 查询oracle中所有用户信息
- JSONObject用法
- 试图解释一门编程语言
- 获取mac地址保存到字符数组并+1
- 哈希表对字符串的高效处理
- JSONObject/JSONArray用法