错误1006(HY000)无法创建数据库(errno:13)MySQL 5.6.12 [英] ERROR 1006 (HY000) Can't create database (errno: 13) MySQL 5.6.12
本文介绍了错误1006(HY000)无法创建数据库(errno:13)MySQL 5.6.12的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在创建数据库时遇到问题,并导致以下错误.
I am facing problem creating the database and it results in following error.
mysql> show grants for 'admin'@'%';
+---------------------------------------------------------------------------------------------------------------------------------+
| Grants for admin@% |
+---------------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' IDENTIFIED BY PASSWORD '*4ACFE3202A5FF5CF467898FC58AAB1D615029441' WITH GRANT OPTION |
+---------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
mysql> create database abc;
ERROR 1006 (HY000): Can't create database 'abc' (errno: 13)
这是我的用户表.
mysql> select host, user from mysql.user;
+-------------+-------+
| host | user |
+-------------+-------+
| % | admin |
| 127.0.0.1 | root |
| ::1 | root |
| IVM-MMC-DGW | root |
| localhost | admin |
| localhost | root |
+-------------+-------+
6 rows in set (0.00 sec)
mysql> show grants;
+-----------------------------------------------------------------------------------------------------------------------------------------+
| Grants for admin@localhost |
+-----------------------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' IDENTIFIED BY PASSWORD '*4ACFE3202A5FF5CF467898FC58AAB1D615029441' WITH GRANT OPTION |
+-----------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
我可以在现有数据库中创建和删除表.
I can create and remove table in the existing database.
数据目录已经具有mysql:mysql特权,并且登录用户也具有创建新数据库的特权.
The data directory already has mysql:mysql privileges and also the logged in user has privilege to create the new database.
这里缺少什么配置?
推荐答案
MySQL数据目录可能存在权限问题.您可以尝试如下设置权限(调整数据目录的路径)
There may be a permissions issue with the MySQL data directory. You could try setting the permissions as follows (adjust the path to your data directory)
chown -R mysql:mysql /usr/local/mysql/data
这篇关于错误1006(HY000)无法创建数据库(errno:13)MySQL 5.6.12的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文