当我在mysql8.0中用分区和数据目录创建表时,发生了错误:错误1525(HY 000):路径值不正确:'/var/lib/mysql/p1'

9udxz4iz  于 2023-03-22  发布在  Mysql
关注(0)|答案(1)|浏览(102)
CREATE TABLE employees1 (

    id INT NOT NULL auto_increment ,

    name varchar(128),

    primary key(id)

) ENGINE=INNODB  

    PARTITION BY LIST(id%10)(

    PARTITION p1 VALUES IN (0,1,2,3,4)

    INDEX DIRECTORY = '/var/lib/mysql/p1'

    DATA DIRECTORY = '/var/lib/mysql/p1',

    PARTITION p2 VALUES IN (5,6,7,8,9)

    INDEX DIRECTORY = '/var/lib/mysql/p2'

    DATA DIRECTORY = '/var/lib/mysql/p2'

);

正确的路径值是多少?

wrrgggsh

wrrgggsh1#

请参阅本文:https://dev.mysql.com/doc/refman/8.0/en/replication-features-directory.html
基本上,您需要确保p1和p2存在于正确的位置,并且尝试访问它的操作系统用户具有必要的权限。

相关问题