当前位置:网站首页>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退出
边栏推荐
- Leetcode daily practice - the number of digits in the offer 56 array of the sword finger
- Sort 3-select sort and merge sort (recursive implementation + non recursive implementation)
- "Wei Lai Cup" 2022 Niuke summer multi school training camp 3 j.journey 0-1 shortest path
- HDU1847解题思路
- QT packaging
- Wei Jianjun couldn't catch up with Li Shufu by riding a BMW
- 一大早支付宝来短信说你中“奖”了?处理服务器挖矿病毒 - kthreaddi
- LeetCode每日一练 —— 剑指Offer 56 数组中数字出现的次数
- Headline article_ signature
- Microsoft question 100 - do it every day - question 16
猜你喜欢

遭MQ连连干翻后的醒悟!含恨码出这份MQ手册助力秋招之旅
![[pointer internal skill cultivation] character pointer + pointer array + array pointer + pointer parameter (I)](/img/e8/2044cae63fe2145ce6294cb1fdfaa0.png)
[pointer internal skill cultivation] character pointer + pointer array + array pointer + pointer parameter (I)

Nowcode- learn to delete duplicate elements in the linked list (detailed explanation)

Ansa secondary development - Introduction to interface development tools

Thoughts on solving the pop-up of malicious computer advertisements

laravel

小程序:获取元素节点信息

IM即时通讯开发优化提升连接成功率、速度等

Stm32cube infrared remote control: input capture

优化Hypermesh脚本性能的几点建议
随机推荐
后台弹出layer提示
Headline article_ signature
Stm32cube infrared remote control: input capture
Baidu editor ueeditor, when editing too much content, the toolbar is not visible, which is not convenient for editing or uploading problems
LeetCode-学会复杂带随机指针链表的题(详解)
重置grafana登录密码为默认密码
使用js直传oss阿里云存储文件,解决大文件上传服务器限制
Wechat official account to obtain material list
有趣的 Kotlin 0x06:List minus list
CRC16数据校验支持ModelBus和XMODEM校验模式(C语言)
LeetCode每日一练 —— 剑指Offer 56 数组中数字出现的次数
Abaqus GUI界面解决中文乱码问题(插件中文乱码也适用)
有趣的 Kotlin 0x08:What am I
"Wei Lai Cup" 2022 Niuke summer multi school training camp 3 a.ancestor lca+ violence count
Kubeedge releases white paper on cloud native edge computing threat model and security protection technology
遭MQ连连干翻后的醒悟!含恨码出这份MQ手册助力秋招之旅
WSL+Valgrind+Clion
Several methods of HyperMesh running script files
C language exception handling mechanism: jump function jump function setjmp/sigsetjmp and longjmp/siglongjmp
Ansa secondary development - Introduction to interface development tools