---
title: "The user specified as a definer ('root'@'%') does not exist"
author: "yang8820"
date: "2013-04-29T01:50:39Z"
tags: ["MySQL", "mysql用户"]
categories: ["数据库"]
slug: "the-user-specified-as-a-definer-root-does-not-exist"
draft: false
lastmod: "2013-04-29T01:50:39Z"
id: 1856860
url: "https://yang8820.iteye.com/blog/1856860"
---

MySQL 数据库新建用户来访问。出现The user specified as a definer (['root'@'%'](mailto:'root'@'%')) does not exist

因为函数创建者是root用户。

只要将root帐户设置为所有服务都能访问即可。  
grant all privileges on \*.* to [root@"%](mailto:root@%22%)" identified by "password";

Flush privileges;