I have a working PHP server. Now I want to use databases (MySQL or something similar). Is it possible to create a database from PHP?
I would like to emphasize that in my case I do not have any user-name and password which I can use to connect to MySQL server. I also do not have a control-panel where I could create a database or a table in an existing database.
ADDED:
I think SQLite is what I need. But if I try to create a new database from PHP I see that PHP tries to create a file in a directory which is different from the directory where my files are supposed to be. Then it reports that it is unable to create the database and I think it is because it tries to create in the directory to which I have no permission to write. Can I force PHP to create SQLite in a specific directory?
I'm assuming you want to create an SQL database without access to a stand-alone database server. You could use SQLite, which is a library that creates a lightweight database in a single file without separate processes.
It's not quite as efficient as a standalone database server, however, so if you need performance, use a proper database server. It's not an unreasonable requirement for a high-performance web app.
Mysql,no. SqlLite is a possibility, you only need write permissions on the filesystem. www.sqlite.org/
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