Is it possible to connect PHP with portable MySQL file ?
Asked
Active
Viewed 312 times
-4
-
If you're using sqlite, yes. – Ja͢ck Apr 04 '13 at 06:23
-
Obvious.. U just need to set the path in the config.php file if you are using a single file to connect to your database.. I always use config.php and put all the connection strings required.. – Hiren Pandya Apr 04 '13 at 06:23
-
Its possible, how ever I suggest you to search here or in GOOGLE how to do that.. http://stackoverflow.com/questions/2002406/is-it-better-to-use-mysql-or-files-to-store-data/2002430#2002430 this can be helpful – Svetoslav Apr 04 '13 at 06:25
-
1you have to protect your file via .htaccess otherwise it could be downloaded – Azathoth Apr 04 '13 at 06:26
1 Answers
2
Check out sqlite if you want a "file" database however , you shouldnt use it in production for your website if you aim at medium/high traffic , but for local testing it is ok.

mpm
- 20,148
- 7
- 50
- 55
-
-
So what's your problem then ? stick to mysql which is a server. You can use mysql with ASP.NET too , can you put it in a file in the app folder ? no. – mpm Apr 04 '13 at 06:58
-
When I work on any existing project I have to export database from existing site and I have to import that database. But if we keep database in application then no need to import or export... – AsgarAli Apr 04 '13 at 08:13