---
title: "linux mysql"
author: "80082828"
date: "2014-12-13T16:27:31Z"
tags: []
categories: ["互联网"]
slug: "linux-mysql"
draft: false
lastmod: "2017-10-31T14:53:31Z"
id: 2166041
url: "https://80082828.iteye.com/blog/2166041"
---

一、设置mysql远程访问
grant all on *.* to root@'%' identified by '密码'; 
flush privileges;
二、设计mysql开机启动
chkconfig mysqld on
三、查看开机启动项
chkconfig --list

字符集修改
[mysqld]
default-character-set=utf8

[client]
default-character-set=utf8

[mysql]
default-character-set=utf8

增加普通用户后，不能登录，提示ERROR 1045 (28000): Access denied for user 'kbm'@'localhost' (using password: YES)，执行： 
mysql> use mysql 
mysql> delete from user where user=''; 
mysql> flush privileges; 
意思是删除匿名用户。 