Requirements Description :
When you use a database, or just take over a database, you can see where the data files for that database are stored.
Operation Process :
1. View the data catalog by viewing the DATADIR system variable
[[email protected] Mysql-bin]$ mysql-Uroot-penter password:welcome toThe MySQL Monitor. CommandsEnd with;or\g.your MySQL Connection ID is 8Server Version:5.5. $-LogMySQL Community Server (GPL) Copyright (c) -, ., Oracleand/orits affiliates. Allrights reserved. Oracle isA registered trademark ofOracle Corporationand/oritsaffiliates. Names may trademarks oftheir respectiveowners. Type'Help ;' or '\h' forHelp. Type'\c' toClear the Currentinput Statement.mysql>Show variables like 'DataDir';+---------------+--------------+|Variable_name|Value|+---------------+--------------+|DataDir| /Mysql/Data/ |+---------------+--------------+1Rowinch Set(0.09Sec
Note: In the example above, the data directory is in the/mysql/data/directory.
Document creation Time: April 3, 2018 19:32:49
MySQL database, view data storage directory DataDir