Creating/importing mysql database when host doesn't allow creation of databases from script (php) -
I asked first and got some good code, but I am concerned with a comment I asked that the sql file in php on the shared host How to create and import mysql databases from One of the commentators said that some hosts can not allow me to do this with php. After doing some excavation at other places, somebody suggested that I can create a database from the host control panel but can execute SQL scripts by executing tables through SQL queries like this:
'my name' ('name' here) ('id' int (25) no zero default '0', 'CLMN name here' varchar (250) matching Latin 1_general_ci default cord, `CLMN name here 'int (10) default zero , Primary key (`d Di`)) engine = Maisam default charset = latin1 COLLATE = latin1_general_ci; "); Insert mysql_query ("here", 'here here,' 'VALUE here'););
can any comment on that? What can I do if I have a host with PHP in the database in PHP?
(I'm not sure that it is advisable to create a new question, but I thought There are good examples of doing this in the last question if the host is not blocking everything. I will make a different question to do this if the host is more restrictive.)
shared hosts and Often you do not allow the database to be used in addition to using your control panel, it is not uncommon, and it has been done for good reasons.
And if you do not have it Can not do with phpmyadmin or any other admin tool You will not be able to do this either PHP or PHP.
In that case your only solution is to create the first database using the host's control panel, then edit your backup file and execute it Before comment on CREATE DATABASE statement.
Comments
Post a Comment