Home > Database > Mysql Tutorial > Ubuntu下启动、停止、重启MySQL,查看错误日志命令大全_MySQL

Ubuntu下启动、停止、重启MySQL,查看错误日志命令大全_MySQL

WBOY
Release: 2016-06-01 13:07:56
Original
983 people have browsed it

Ubuntu

1)启动:

sudo /etc/init.d/mysql start
Copy after login

2)停止:

sudo /etc/init.d/mysql stop
Copy after login

3)重启:

sudo /etc/init.d/mysql restart
Copy after login

4)查看日志:

cat /var/log/mysql.errcat /var/log/mysql/error.log
Copy after login

5)不支持中文

修改 /etc/mysql/my.cnf

在 [client] 下面增加:

default-character-set=utf8 或 character_set_server=utf8

在 [mysqld] 下面增加:

default-character-set=utf8 或 character_set_server=utf8

6)错误提示:unknown variable 'default-character-set=utf8'

修改配置文件 /etc/mysql/my.cnf 中的“default-character-set=utf8” 为 “character_set_server=utf8”

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template