当前位置:网站首页>MySQL5.7及SQLyogV12安装及使用破解及常用命令
MySQL5.7及SQLyogV12安装及使用破解及常用命令
2022-07-28 15:45:00 【骑鱼~过海】
文章目录
命令安装
1.创建my.ini配置文件
[mysql]
# 设置mysql客户端默认字符集
default-character-set=utf8
[mysqld]
#设置3306端口
port=3306
# 设置mysql的安装目录
basedir=D:\MySQL\MySQL5.7\mysql-5.7.37-winx64
# 设置mysql数据库的数据的存放目录
datadir=D:\MySQL\MySQL5.7\mysql-5.7.37-winx64\data
# 允许最大连接数
max_connections=1000
# 服务端使用的字符集默认为8比特编码的latin1字符集
character-set-server=utf8
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB
# (数据库启动的时候 跳跃权限表的限制,不用验证密码,直接登录),保存
#skip-grant-tables
#设置包的大小
max_allowed_packet = 100G
命令使用
配置环境变量及开启服务


开启服务
net start mysql 开启服务
net stop mysql 停止服务
2. (数据库启动的时候 跳跃权限表的限制,不用验证密码,直接登录),保存
#skip-grant-tables
3.修改密码:
修改user表
update mysql.user set authentication_string=PASSWORD(“123456”) where user=“root” and host=“localhost”
4.开放权限:
$ mysql -uroot -p
Enter password:
mysql> use mysql
Database changed
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '你的密码' WITH GRANT OPTION;
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye
5.开放的mysql导入的数据包大小
- 加在mysqld后:
永久开放:
max_allowed_packet = 100G
临时开放:
set global max_allowed_packet=524288000
查看:
show VARIABLES like '%max_allowed_packet%’;
6.SQLYog及MySQL5.7安装包下载
https://download.csdn.net/download/Tian208/85389667
7.命令
show database ; 显示数据库
create database name; 创建数据库
use databasename; 选择数据库
drop database name 直接删除数据库,不提醒
show tables; 显示表
describe tablename; 表的详细描述
select 中加上distinct去除重复字段
mysqladmin drop database name 删除数据库前,有提示。
select version(),current_date; 显示当前mysql版本和当前日期
exit退出
边栏推荐
- Huada chip hc32f4a0 realizes RS485 communication DMA transceiver
- Redis系列4:高可用之Sentinel(哨兵模式)
- Abaqus GUI界面解决中文乱码问题(插件中文乱码也适用)
- Optimization of network request success rate in IM instant messaging software development
- Sort 2 bubble sort and quick sort (recursive and non recursive explanation)
- Leetcode learn complex questions with random pointer linked lists (detailed explanation)
- curl无输出返回空白或者null问题解决
- ANSA二次开发 - 界面开发工具介绍
- CRC16数据校验支持ModelBus和XMODEM校验模式(C语言)
- HM secondary development - data names and its use
猜你喜欢

一小时内学会Abaqus脚本编程秘籍

LwIP development | realize TCP server through socket

Two of C language programming!! Role of

LeetCode每日一练 —— 剑指Offer 56 数组中数字出现的次数

HM二次开发 - Data Names及其使用

About the web docking pin printer, lodop uses

LeetCode-学会对无序链表进行插入排序(详解)

优化Hypermesh脚本性能的几点建议

Each account corresponds to all passwords, and then each password corresponds to all accounts. How to write the brute force cracking code

Kubeedge releases white paper on cloud native edge computing threat model and security protection technology
随机推荐
Ansa secondary development - build ansa secondary development environment on Visual Studio code
LwIP development | socket | DNS domain name resolution
Two of C language programming!! Role of
PHP获取小程序码,小程序带参数跳转
PHP mb_ Substr Chinese garbled code
KubeEdge发布云原生边缘计算威胁模型及安全防护技术白皮书
Geodetic coordinate system to Martian coordinate system
Pop up layer prompt in the background
mysql cdc 如果binlog日志文件不全,全量阶段能读到所有数据吗
LwIP development | socket | UDP
Redis series 4: sentinel (sentinel mode) with high availability
排序4-堆排序与海量TopK问题
El input limit can only input the specified number
FX3开发板 及 原理图
Introduction and implementation of stack (detailed explanation)
日常开发方案设计指北
Leetcode daily practice - 160. Cross linked list
Li Hongyi, machine learning 4. Deep learning
nowcode-学会删除链表中重复元素两题(详解)
ANSA二次开发 - 抽中面的两种方法