ubuntu mysql启动|停止|重启

时间:2022-05-06
本文章向大家介绍ubuntu mysql启动|停止|重启,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。
// Mysql  
/etc/init.d/mysql start  
/etc/init.d/mysql stop  
/etc/init.d/mysql restart 

在ubuntu启动mysql:没有加sudo,命令不起作用,必须加上sudo

harries@harries-laptop:/usr/local$ /etc/init.d/mysql start Rather than invoking init scripts through /etc/init.d, use the service(8) utility, e.g. service mysql start Since the script you are attempting to invoke has been converted to an Upstart job, you may also use the start(8) utility, e.g. start mysql

命令前加上sudo

harries@harries-laptop:/usr/local$ sudo /etc/init.d/mysql start Rather than invoking init scripts through /etc/init.d, use the service(8) utility, e.g. service mysql start Since the script you are attempting to invoke has been converted to an Upstart job, you may also use the start(8) utility, e.g. start mysql mysql start/running, process 9209