
Mysql客户端内-常用命令详解
������MySQL��� ������SQL��������� ������������������������ ������������������������ ��������������������� ������ source ��������� ������ < ���������
发布日期:2021-05-14 09:15:47
浏览次数:19
分类:精选文章
本文共 1898 字,大约阅读时间需要 6 分钟。
Mysql ���������������������
Mysql ������������
- ������������������������
/var/lib/mysql/
- ���������������
/usr/share/mysql/
- ���������������
/usr/bin/
������mysqladmin
���mysqldump
������ - ���������������
/etc/init.d/mysql/
������������
������MySQL
- ���������������
mysql -uroot -pmysql
- ���������������
mysql -h 127.0.0.1 -uroot -pmysql
������������
mysql -u root -p
use mysql;update user set password=PASSWORD('���������') where user='root';flush privileges;quit;
���������������
- ���������
grant select,insert,update,delete on *.* to newuser@localhost identified by '������';
- ���������
mysql> grant all privileges on *.* to root@localhost identified by 'mysql';
������������
- ���������������
mysql -uroot -p
delete from user where user='���������' and host='localhost';flush privileges;
���������������
���������������������
mysql> show databases;
���������������
mysql> create database test;
���������������
mysql> use test;
���������������������
mysql> select database();
���������������
mysql> show tables;
���������������
mysql> drop database test;
���������
���������
create table MyClass( id int(4) not null primary key auto_increment, name char(20) not null, sex int(4) not null default '0', degree double(16,2));
���������������
describe MyClass;
���������
drop table MyClass;
���������������������
������ mysqldump ������
mysqldump -u root -p > /path/to/backup.sql
mysqldump -u root -p mydb > /path/to/mydb.sql
mysqldump -u root -p mydb --add-drop-table > /path/to/mydb_stru.sql
������������������������
mysql -u root -p < /path/to/backup.sql
mysql -u root -p < /path/to/backup.sql
������������
- ������������ dbname ���������������������������������
- ������������������������������������������������������������������������������
发表评论
最新留言
关注你微信了!
[***.104.42.241]2025年04月26日 04时15分57秒
关于作者

喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
安装office报错:无法安装64位office,PC上找到了32位程序
2021-05-15
Robotframwork输出日志里中文显示乱码问题
2021-05-15
JVM学习(三)
2021-05-15
c++链表实现通讯录管理系统
2021-05-15
设计模式--单一职责原则的个人理解
2021-05-15
go语言学习--day3(函数)
2021-05-15
树莓派的外设开发
2021-05-15
百度飞浆深度学习_卷积神经网络(思维导图手写笔记)(1:理论部分)
2021-05-15
VGG中1*1的卷积核相比于全连接层的好处及原因
2021-05-15