首页 > 数据库 >ubuntu关闭mysql开机自启动

ubuntu关闭mysql开机自启动

时间:2023-01-05 18:01:53浏览次数:36  
标签:enable service mysql ubuntu disable command MySQL 自启动

To disable MySQL from starting automatically at boot time on Ubuntu, follow these steps:

  1. Open a terminal window.
  2. Use the following command to stop the MySQL server:
sudo service mysql stop
  1. Use the following command to disable the MySQL service:
sudo update-rc.d mysql disable

This will disable the MySQL service from starting automatically at boot time. You can use the same command with "enable" instead of "disable" to re-enable the service.

Alternatively, you can use the following command to disable the MySQL service:

sudo systemctl disable mysql.service

This will also prevent MySQL from starting automatically at boot time. You can use the same command with "enable" instead of "disable" to re-enable the service.

Note: These instructions are for Ubuntu systems using the init.d scripts to manage service startup. If you are using a system that uses systemd to manage service startup, you may need to use different commands to control the startup of the MySQL service.

标签:enable,service,mysql,ubuntu,disable,command,MySQL,自启动
From: https://www.cnblogs.com/vv3b/p/17028479.html

相关文章

  • window下MySQL的压缩包方式安装--单版本或多版本(5.7和8共存)通用
    环境:win11MySQL版本:5.7和8.311.下载MySQL数据库注意:记得查看自己电脑是32位还是64位的,这里下的64位的,64位的电脑可以用32位的包,32位的用64的包可能有问题8版本官网下......
  • mysql学习笔记
    1、​​MySQL索引详细介绍​​2、MySql索引实现原理索引的本质MySQL官方对索引的定义为:索引(Index)是帮助MySQL高效获取数据的数据结构提取句子主干,就可以得到索引的本质:索......
  • ubuntu换源
    sudocp/etc/apt/sources.list/etc/apt/sources.list.backup在文件中添加国内源然后sudoapt-getupdate就ok了。常用国内源:阿里云源debhttp://mirrors.aliyun.com/......
  • shell备份mysql数据库指定表
    1、先执行命令:netstat -ln |grep mysql获取当前mysql的socket  2、执行如下命令备份数据库的指定表mysqldump -hIP-P端口-u数据库用户-p数据库密码--sock=......
  • 基于Linux下的Ubuntu操作系统常用命令
    一 .linux操作系统的特点1、linux下一切皆文件2、linux系统就像一个倒置数3、linux系统支持多用户、多任务二.Ubuntu--“乌班图”操作系统Ubuntu是一个以桌面应......
  • ubuntu下docker及打deb包
    Bash函数-BashShell教程#文件测试-e文件存在-a文件存在这个选项的效果与-e相同.但是它已经被弃用了,并且不鼓励使用-ffile是一个regular文件(不是目录或者设备文......
  • 一个查找mysql数据库无主键表的脚本
    说明:遍历所有的库表然后查询是否具有主键/bin/bashdb_host=172.19.211.2#dbipdb_name_list="chimessoxrayintcommpultus"#填写db_name支持多个数据库,以空格隔......
  • Sqlserver,Mysql基础SQL语句
    Sqlserver,Mysql基础SQL语句SqlServer建表CREATETABLE[IFNOTEXISTS]表名( 字段名列类型[属性], 字段名列类型[属性], ....... 字段名列类型[属性]);......
  • MySQL 8.x 数据库主从复制搭建
    前提:MySQL修改server-uuid的方法前提:如果服务器是克隆master的服务器的,server-uuid值都是一样的。会导致主从复制报错误1593,修改一下server-uuid以后重启MySQL1.查......
  • pymysql之常见数据库操作
    导包并关联数据库importpymysqlconn=pymysql.Connect(host='localhost',user='root',db='stu',port=3306,password='dong')c=conn.cursor()查询某数据库各个表名sql=......