CREATE TABLE `city` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `Name` char(35) NOT NULL DEFAULT '', `CountryCode` char(3) NOT NULL DEFAULT '', `District` char(20) NOT NULL DEFAULT '', `Population` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`ID`), KEY `CountryCode` (`CountryCode`), CONSTRAINT `city_ibfk_1` FOREIGN KEY (`CountryCode`) REFERENCES `country` (`Code`) ) ENGINE=InnoDB AUTO_INCREMENT=4080 DEFAULT CHARSET=latin1 DATA DIRECTORY='e:/var/tablespaces';
Ardından tabloları getirmek için aşağıdaki adımları gerçekleştiriyoruz:
mysql -uroot -p -e "drop database world" mysql -uroot -p -e "create database world" mysql -uroot -p world < world.sql
Böylelikle world veri tabanındaki tabloların ibd dosyaları e:/var/tablespaces dizini altında oluşacaktır:
E:\opt64\mysql-advanced-5.7.17-winx64\bin>cd e:\var\tablespaces e:\var\tablespaces>dir Volume in drive E is SSD Volume Serial Number is CAFE-BABE Directory of e:\var\tablespaces 01/22/2017 10:22 AM <DIR> . 01/22/2017 10:22 AM <DIR> .. 01/22/2017 10:23 AM <DIR> world 0 File(s) 0 bytes 3 Dir(s) 38,019,444,736 bytes free e:\var\tablespaces>cd world e:\var\tablespaces\world>dir Volume in drive E is SSD Volume Serial Number is CAFE-BABE Directory of e:\var\tablespaces\world 01/22/2017 10:23 AM <DIR> . 01/22/2017 10:23 AM <DIR> .. 01/22/2017 10:23 AM 606,208 city.ibd 01/22/2017 10:23 AM 163,840 country.ibd 01/22/2017 10:23 AM 229,376 countrylanguage.ibd 3 File(s) 999,424 bytes 2 Dir(s) 38,020,681,728 bytes free
No comments:
Post a Comment