1 使用innodb_file_per_table为每个表使用独立的表空间 2 mysql help Windows Vista, Windows Server 2008, or newer have native symbolic link support, so you can create a symlink using the mklink command. This command requires administrative privileges. Change location into the data directory: C:\> cd \path\to\datadir In the data directory, create a symlink named mydb that points to the location of the database directory: C:\> mklink /d mydb D:\data\mydb After this, all tables created in the database mydb are created in D:\data\mydb.
嗯,谢谢回复,研究一下软连接,不知道InnoDB软连接是否可靠,mysql手册中有这样一段话 Symlinks are fully supported only for MyISAM tables. For files used by tables for other storage engines, you may get strange problems if you try to use symbolic links. For InnoDB tables, use the alternative technique explained in Section 14.2.5.4, “Specifying the Location of a Tablespace” instead.
使用innodb_file_per_table为每个表使用独立的表空间
2
mysql help
Windows Vista, Windows Server 2008, or newer have native symbolic link support, so you can create a symlink using the mklink command. This command requires administrative privileges. Change location into the data directory: C:\> cd \path\to\datadir In the data directory, create a symlink named mydb that points to the location of the database directory: C:\> mklink /d mydb D:\data\mydb After this, all tables created in the database mydb are created in D:\data\mydb.
这个参数可以分散io,分到不到磁盘
这里头,本来就可以指定到不同的磁盘分区啊,
不知道楼主到底想问什么?
这么配置可以分散ibd文件,真正的数据存放在datadir=指定的目录下,现在的情况是datadir目录所在的分区快满了。使用软连接也是一个不错的方案,现在问题就出在,只有一个数据库,所用的数据表都存放在这一个数据库中,
Symlinks are fully supported only for MyISAM tables. For files used by tables for other storage engines, you may get strange problems if you try to use symbolic links. For InnoDB tables, use the alternative technique explained in Section 14.2.5.4, “Specifying the Location of a Tablespace” instead.