gpt4 book ai didi

mysql - ERROR 1006 (HY000) 无法创建数据库 (errno : 13) MySQL 5. 6.12

转载 作者:IT老高 更新时间:2023-10-28 23:47:04 27 4
gpt4 key购买 nike

我在创建数据库时遇到问题,并导致以下错误。

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)

我可以在现有数据库中创建和删除表。

数据目录已经有mysql:mysql权限,登录用户也有创建新数据库的权限。

这里缺少什么配置?

最佳答案

MySQL 数据目录可能存在权限问题。您可以尝试如下设置权限(调整数据目录的路径)

chown -R mysql:mysql /usr/local/mysql/data

关于mysql - ERROR 1006 (HY000) 无法创建数据库 (errno : 13) MySQL 5. 6.12,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18719748/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com