phpMyAdmin

~Yuckfou~

Lovely person
Joined
Dec 22, 2003
Messages
2,594
I'm using ver 2.6.1, I use the word "using" in the "not got a clue" sense.
I need to import one .sql file into another existing .sql file on my webspace. To be honest I nearly cracked open a bottle of bubbly when the phpMyAdmin install worked first time and pointed straight to my sql db.
Can anyone give me a dummies guide how to import a new .sql file into my existing file?
I have backed everything up so if it goes fubar I won't shout :)
I have tried and clicked everyhting but I'll be buggered* if I can find anything with the word import in it.
ta.




* Not at all true.
 

Chilly

Balls of steel
Joined
Dec 22, 2003
Messages
9,047
you need to paste the contents of the db into that sql box or something - iv only used it a few times to hack my postcount on my forum, i managed to post 55k posts in a day once, really.
 

Gat_Decor

Fledgling Freddie
Joined
Aug 7, 2004
Messages
394
What are you actually trying to do, create a new database or run a sql script on the database that is already created?

if you run phpmyadmin, at the bottom left there is a link called 'Query Window' when clicked will bring up a box that will let you run/copy sql scripts on the database of your choice.
 

~Yuckfou~

Lovely person
Joined
Dec 22, 2003
Messages
2,594
I'm running osCommerce. One of the contributions I need to add means making changes to the mysql database. The contribution has a .sql file, the instructions are to import the .sql file into the main store database. Theres a shedload of other stuff to do but thats all php and not too difficult.

So in summary I have a sql file and I need to import (merge?) another sql file into it.

A thought that occured is that maybe I start by pointing at the new file and export it into the existing file?

I know zilch about databases so plain english please, ta :)
 

Dweller

Fledgling Freddie
Joined
Jan 9, 2004
Messages
300
~Yuckfou~ said:
So in summary I have a sql file and I need to import (merge?) another sql file into it.

Ok, by the sounds of things what you've got is an existing database and you need to import a new .sql file into it, right ?

Select the database in phpmyadmin, then go to the SQL box/tab and you should get something that says: "Run SQL query/queries on database [your db name here]" with a box below for you to enter an SQL query.

Further down, you should also get a section that says something like "Or Location of the textfile" with a browse button. You can use this to browse for your .sql file and then hit go to execute it on your DB.

Otherwise, you can open the .sql file in a text editor, and copy/paste the contents into the SQL query window instead, which should do the job just the same.

Important: Make sure you have a backup of the database before doing anything like this ;)
 

~Yuckfou~

Lovely person
Joined
Dec 22, 2003
Messages
2,594
Dweller said:
Ok, by the sounds of things what you've got is an existing database and you need to import a new .sql file into it, right ?


Correctomundo!

I'll try this later when I get home. I back up after every change due to me being clueless :)
 

~Yuckfou~

Lovely person
Joined
Dec 22, 2003
Messages
2,594
Dweller said:
Ok, by the sounds of things what you've got is an existing database and you need to import a new .sql file into it, right ?

Select the database in phpmyadmin, then go to the SQL box/tab and you should get something that says: "Run SQL query/queries on database [your db name here]" with a box below for you to enter an SQL query.

Further down, you should also get a section that says something like "Or Location of the textfile" with a browse button. You can use this to browse for your .sql file and then hit go to execute it on your DB.

Otherwise, you can open the .sql file in a text editor, and copy/paste the contents into the SQL query window instead, which should do the job just the same.

Important: Make sure you have a backup of the database before doing anything like this ;)


Sorted, thanks very much. Have a beer on me :drink:
 

Users who are viewing this thread

Top Bottom