Computer >> Computer tutorials >  >> Programming >> MySQL

Can't find my.ini in MySQL directory?


The my.ini is in hidden folder of program data. First go to C: drive and then hidden folder of program data. From that, move to the MySQL version directory.

Here is the snapshot of the C: drive −

Can't find my.ini in MySQL directory?

Click on C drive. The snapshot is as follows. Here, you can see the Program Data folder −

Can't find my.ini in MySQL directory?

Now go to MySQL under Program Data folder. The snapshot is as follows −

Can't find my.ini in MySQL directory?

Go to MySQL version. The snapshot is as follows −

Note − Here, we are using MySQL version 8.0.12

Can't find my.ini in MySQL directory?

Here is the my.ini file.

Can't find my.ini in MySQL directory?

In order to reach the location, you can also use the following command −

mysql> select @@datadir;

The following is the output −

+---------------------------------------------+
| @@datadir                                   |
+---------------------------------------------+
| C:\ProgramData\MySQL\MySQL Server 8.0\Data\ |
+---------------------------------------------+
1 row in set (0.00 sec)