当前位置:网站首页>mysql的使用
mysql的使用
2022-07-17 05:09:00 【倫之】
Cmd下cmd 下mysql常用的数据库命令
cd E:\phpstudy_pro\Extensions\MySQL5.7.26\bin
在bin文件下操作
net start mysql; net stop mysql;
然后输入 mysql -uroot -p123456 按回车直接进入mysql数据库,出现以 mysql> 开头说明登录成功
- 查看所有数据库show databases;
- 进入某个指定数据库 use user;
- 查看指定数据库的所有表show tables;
- 复制表结构 create table 新表名称 like 原表名称;
- 复制数据 insert into 新表名称 select * from 原表名称;
- 删除表drop table 表名;
- 如果要退出mysql数据库,输入exit;回车
mysql的配置文件
Windows下MySQL的配置文件是my.ini,一般会在安装目录的根目录
Linux下MySQL的配置文件是my.cnf,一般会放在/etc/my.cnf,/etc/mysql/my.cnf
开启binlog日志,并且以ROW方式,开启主从模式 以及logbin的文件位置
在配置文件中修改
log_bin=ON
binlog_format=ROW
server-id=1000
log-bin=/var/lib/mysql/mysql-bin
修改密码
update user set plugin='mysql_native_password',authentication_string=password('123456') where user='root';
Windows下MySQL的重启net stop mysql,net start mysql


边栏推荐
- 在 CDP中使用Iceberg 为数据湖仓增压
- Swagger配置与使用
- Common interview questions of operating system
- 一次全面的性能优化,从5秒优化到1秒
- Online software testing training institutions lemon class and itest AI platform achieves strategic cooperation
- ECS deployment web project
- Opendds QoS and custom QoS (timing, timingqospolicy)
- 操作系統常見面試題
- RK356x U-Boot研究所(命令篇)3.4 mem内存相关命令的用法
- 循环赛制日程表问题
猜你喜欢
随机推荐
ArcMap 创建常量栅格并镶嵌至新栅格
使用Flink SQL传输市场数据1:传输VWAP
Excel calculates the remaining days of the month
Excel导入长数据末尾变000
What are the B domain, m domain and O domain
ambari2.7.5集成es6.4.2
Switch user mode, privileged mode, global mode, port mode
C语言动态内存管理
聊聊redis分布式锁的8大坑
【全网首发】主线程异常会导致 JVM 退出?
Is the cookie valid for a limited time? How to set cookies? Teach you to set by hand
Redis source code analysis 3 implementation of discontinuous traversal
GoFrame 错误处理的常用方法&错误码的使用
BUUCTF web WarmUp
单臂路由配置
ambari 2.7.5集成安装hue 4.6
Rxjs source code analysis (I) observable
Easypoi之excel多sheet导入
Implementation of synchronization interface of 6 libcurl based on libco
从20s优化到500ms,我用了这三招








