MySQL安装路径查询
select @@basedir as basePath from dual //C:\Program Files\MySQL\MySQL Server 5.7\查看MySQL默认安装物理路径
Show variables like "datadir"MySQL连接服务
MySQL -localhost -uroot -proot显示数据库
show databases;退出数据库
exit查看MySQL参数
show variables查看某个具体的值
show variables like "%具体变量%"查看MySQL状态
show status查看某个具体的值
show status like "%具体变量%" 输出结果显示了有哪些线程在运行 show full processlist输出结果显示了有哪些线程在运行,查询当前连接数等信息
show processlist查看MySQL连接相关信息
show global variables like '%connect%';Windows上启动和关闭MySQL服务
net stop MySQL net start MySQL设置用户最大连接数为10
set global max_user_connections=10 MySQL安装目录 select @@basedirMySQL数据存储目录
select @@datadir在windows上查看对应MySQL的配置文件,可以在开始菜单中找到对应的命令行客户端,右键属性功能查询对应的配置文件地址
C:\ProgramData\MySQL\MySQL Server 5.7\my.ini查看日志信息
show variables like 'log_%';是否启用了日志
show variables like 'log_bin'