All,
This is the first time I am using MySQL and hence listing all the steps. This is actually a reinstall of MySQL since my 1st attempt had failed.
I have installed the latest version of MySQL Community Server on my machine. The installation folder is C:\Program Files\MySQL\MySQL Server 5.5
. The data
folder resides in this folder path itself. I have created few tables in the MySQL command prompt by:
1 > Going into MS DOS Prompt.
2 > Making C:\Program Files\MySQL\MySQL Server 5.5
as my current directory
3 > Entered command: mysql -u root -p
4 > Entered password
5 > Placed my script file(.sql) which creates new tables in the folder C:\Program Files\MySQL\MySQL Server 5.5\bin
6 > In the command prompt, typed source <scriptfile>.sql
7 > Now, I get warnings for few tables. But when I enter command SHOW TABLES
, all the tables in the script file are shown.
However, I am not able to locate the tables created in form of directories/files on the drive. The data folder does not contain my tables as well.Can anyone please tell me where are the tables located?
To use the SHOW TABLES command, you need to log on to the MySQL server first. On opening the MySQL Command Line Client, enter your password. Select the specific database. Run the SHOW TABLES command to see all the tables in the database that has been selected.
ini, which store in the MySQL installation folder. 2) Open the “my. ini” with our favor text editor. Find the “datadir”, this is the where does MySQL stored the data in Windows.
The default location for each of the logs is the MySQL Data directory (C:\ProgramData\MySQL\MySQL Server [version number]\Data\), and the default log names are based on the computer's device name.
To view the database created on MySQL Workbench, navigate to Database > Connect to Database . Choose an existing connection to connect to MySQL Server or create a new one. The database created will be as shown in the screenshot below.
On Windows 7, the data directory is, by default, "C:/ProgramData/MySQL/MySQL Server 5.5/Data/". Note that "C:/ProgramData" is a hidden directory.
In windows 8(dont check in other OS)
Enter mysql in command prompt by
mysql -uusername -ppassword
Then type
select @@datadir;
mysql> select @@datadir;
+---------------------------------------------+
| @@datadir |
+---------------------------------------------+
| C:\ProgramData\MySQL\MySQL Server 5.6\data\ |
+---------------------------------------------+
1 row in set (0.00 sec)
Another way!!!
Go to C:\ProgramData\MySQL\MySQL Server 5.6\my.ini
and there you can find datadir.
Be sure it is in ProgramData, not in ProgramFiles.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With