当前位置:网站首页>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


边栏推荐
- Is the cookie valid for a limited time? How to set cookies? Teach you to set by hand
- MySQL--存储和游标
- OpenDDS的QoS和自定义QoS(校时TimingQosPolicy)
- 柠檬班软件测试培训可靠吗 这个从培训班逆袭成功的案例告诉你
- 使用Flink SQL传输市场数据1:传输VWAP
- Solutions for vscode terminal failure
- Easypoi之excel模板导出
- 聊聊redis分布式锁的8大坑
- Redis source code analysis - data structure and Implementation (Dictionary dict)
- Parent components plus scoped sometimes affect child components
猜你喜欢
随机推荐
运维安全要了解的二三事
Common methods of goframe error handling & use of error codes
Pointer advanced simple summary
Implementation of synchronization interface of 6 libcurl based on libco
Web3js development technology
Data Lakehouse的未来-开放
路由器loopback口实验
Single arm routing configuration
Talk about the 8 pits of redis distributed lock
Excel template export of easypoi
MapBox 加载本地离线地形
软件测试就业前景怎样 人才需求大,岗位稳定性强
[ES6] quickly print user information to the page
Shell script configures root to login to other hosts without secret
Redis source code analysis - data structure and Implementation (Dictionary dict)
MySQL cache strategy and solution
[first launch in the whole network] automatic analysis of JVM performance problems
Usage and examples of vlookup function
redis 源码分析 跳表实现
Excel导入长数据末尾变000









