views:

514

answers:

1

Hi All,

Can anyone give any input on how to create database in mysql where it should create its data file at runtime instead of storing it on default location specified in my.cnf.

Is there any way for doing this in mysql anyone come across.

Thanks in advance.

+1  A: 

Use a --datadir option to specify the new data directory location each time you start the server.

link

Haim Evgi
i am creating database through script at runtime. so i want to give a path at runtime
MySQL DBA