首页> 开发问题 >后端问题 后端问题
MySQL: unrecognized service错误解决办法
作者:小萝卜 2019-09-09 【 MySql 漏洞BUG 】 浏览 4484
简介通过service mysql start命令启动mysql,mysql启动不了,报错mysql: unrecognized service,让我们来解决它
今天公司重启了下服务器,然后发现网站打不开了,经过排查发现是mysql没有启动,所以萝卜进入到服务器使用命令 service mysql start来启动mysql,但是没启动的了,而且还报错了。
[root@ctohome.com ~]# service mysql start
mysql: unrecognized service
[root@ctohome.com ~]# service mysql restart
mysql: unrecognized service
查询发现mysql已经正常安装
[root@ctohome.com ~]# rpm -q mysql
mysql-5.1.52-jason.1
通过该命令可以直接启动mysql
[root@ctohome.com ~]# /etc/rc.d/init.d/mysqld start
Starting mysqld: [ OK ]
[root@ctohome.com ~]# ls /etc/rc.d/init.d/mysqld -l
-rwxr-xr-x 1 root root 5509 Dec 18 02:31 /etc/rc.d/init.d/mysqld
设置mysql开机启动
[root@ctohome.com ~]# chkconfig mysqld on
修改mysqld执行权限
[root@ctohome.com ~]# chmod 755 /etc/rc.d/init.d/mysqld
用最开始的命令来启动或重启mysql,搞定OK
[root@ctohome.com ~]# service mysqld start
Starting mysqld: [ OK ]
[root@ctohome.com ~]# service mysqld start
Starting mysqld: [ OK ]
[root@ctohome.com ~]# service mysqld status
mysqld (pid 9487) is running...
很赞哦! (0)
相关文章
- [vs code] 运行go包提示:Code is already running!
- 使用mysql_list_tables()方法报错
- PHP查询报错, Fatal error: Allowed memory size of 134217728 bytes exhausted
- tp3.2插入数据时SQLSTATE[HY000]: General error
- TP6报错致命错误: Cannot use object of type stdClass as array
- Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script in
- windows下mysql中文乱码, 配置解决方法
- Site error: the ionCube PHP Loader needs to be installed.
- 网站打不开错误提示:ERR_CONTENT_DECODING_FAILED
- 错误400-The request sent by the client was syntactically incorrect