I'm having an old project which have server language is php. The project have .sql file database. How can we deal with this .sql file (i.e open in database program like MySQL workbench) to see the list of table and the corresponding data type, and real data type store in that table?
Any help is much appreciate.
P.S.: My php folder is zip and download from production server. I need to find out the incorrect data in .sql table (i.e see table content, real data inside)
.sql file is actually a database dump. You will have to import it using any MySQL management tool like phpmyadmin or MySQL workbench. See this thread
How can I import data into mysql database via mysql workbench?
Related
I've Installed XAMPP Server, and running localhost for web development Purposes. And Database used is MySQL, In MySQL installation i've created a user named "Rahul" And set a Password for that user.
And this PHP script :https://www.dropbox.com/s/mxeq8o2cryvmps5/Php.php?dl=0
Returns "Database created successfully", So where is the Database file stored Physically on my PC,
How can i Find the Database (.db/.mdb) File, So as to directly View and Upload to a hosting server?
Open phpMyAdmin and Click on database which you want to you want to upload to the server.
then click on Export option and then choose SQL and press go.
It will create the .sql file which contains all the queries which will create exact copy of your database on server.
and if you currently wanted to see which data it contains then export that database in other format such as CSV or wordpad or PDF format...
While you want to upload that database on server just go in phpMyAdmin of server and import that .sql file...
I work often in MS Access and I always create linked tables to csv or txt files so that when some part of data changes in a source file the change appears in the dtb as well.
Is there a way to create linked tables in a mysql database used for storing data for php page?
Can phpMyAdmin in xampp do this?
MySQL supports a CSV storage engine.
Read the documentation here for more details:
http://dev.mysql.com/doc/refman/5.6/en/csv-storage-engine.html
So you can create a table that is linked to a CSV file, and if you modify the file, the new data will immediately become visible to SQL queries.
Yes, you can create a linked table to MySQL in Access. You will have to install the MySQL driver on the user's machine, and setup an ODBC. Then you can create a linked table to that ODBC connection.
i am using mysqldump to backup the database available in MySQL using the PHP to the sql dump format which creates the .SQL file. if i want to view / check the backup file then i have to import it first in order to check/verify/view the data which takes a lot of time.
the issue/question is whether there is some way to create the backup copy of the MySQL database in some other format like MS-ACCESS etc rather than sql dump .sql file ?
it will make it easy to open and check the database backup files.
In basic terms you cannot do that, mysqldump is literally a sql file which has insert statements which would insert the data, where as a Ms-access has a accdb which is where the data is actually stored.
The import you are running actually takes the sql file and inserts it into your access db.
On my older computer's HDD, I have WAMP5 installed with MySQL and PHPMyAdmin. The data is in the folder. How do I get that data that is in three files? The data is at E:\wamp\bin\mysql\mysql5.5.24\data\fbdb, I can see it.
I want to import the country table to the fbdb database, these are the files I have from it: country.MYD, country.frm and country.MYI
What do I do with these files to add to new database?
Assuming you've created an 'fbdb' database on the new computer, just copy the country.* files you've found into the 'fbdb' folder under your new machine's MySQL data directory, and restart the MySQL server -- as long as it's the same version or newer as the MySQL server on which the table was created, this should be all you need to do, as the MySQL engine will automatically check, and if necessary update, the 'country' table from those files.
You should export and then import the desired parts of your database from your old disk to your new disk, or even the whole database. First you export what you need into a file then you can use that file to import it into the database. Read this forum thread for more information.
I have a database with two tables in it, and I have exported them into a "dump.sql" file in my computer.
I am using a free web hosting service (000webhost.com) and I have a database named "username_newdb" and I want the two tables to be imported in that database.
I tried "Import" from phpmyadmin page, but it gives the error access denied for user, I don't know why. Moreover, I prefer to import the tables into new database, not to import (and create) the whole database. Can I do this? Maybe with PHP code?
If not, creating a new database would be accepted, too.
Any help would be appreciated.
if you can connect to that database from your computer directly, you can use any mysql manager to do the import, assuming your login/password is right as backup sql is just text file with bunch of INSERTs and CREATE TABLEs (so basically phpmyadmin should not even complain).