Forum Moderators: open

Message Too Old, No Replies

SQL question from newbie

what do I have to do here?

         

joeking

8:46 pm on Mar 27, 2006 (gmt 0)

10+ Year Member



I am installing a poll script and it says:

"Use a MySQL database interface like phpMyAdmin to install the SQL in the file XXXXXXSQL.sq"

I have found the phpMyAdmin interface on my cPanel, but don't know how to install the SQL in a file.

Can anyone help?

jatar_k

8:59 pm on Mar 27, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



you don't necessarily need to use phpmyadmin but you need to import that file. I imagine that is the database and table creation as well as base data needed to run/configure the script.

you can import these files at the commandline as well, which is sometimes easier

at the prompt

mysql -h hostname -u username -p databasename < /path/to/file/XXXXXXSQL.sql

or in phpmyadmin

I think you have to create a database first
then you select that db and click on 'operations'
you can then upload in that screen I think

I don't really use phpmyadmin, I have always done things at the commandline

often hosts will have tutorials about creating databases and using phpmyadmin

joeking

9:16 pm on Mar 27, 2006 (gmt 0)

10+ Year Member



I have created a database - it says to do that after "Use a MySQL database interface like phpMyAdmin to install the SQL in the file XXXXXXSQL.sq".

But I'm still not sure what I should be doing here. Looking at phpMyAdmin, there doesn't seem to be anything that does the above.

jatar_k

9:21 pm on Mar 27, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



sorry I was wrong

my version is 2.6.4-pl2

I have a single version and don't use it so when I login I then select the db I want to use from the dropdown on the left

I then click on the SQL tab at the top

at the bottom of that page it shows "Or Location of the text file:"

click browse
select file on local machine
hit open
then click Go at the bottom

this can take a long time depending on the size of the file and can timeout. This is the main reason I just ftp the file and do it from the commandline ;)

joeking

10:05 pm on Mar 27, 2006 (gmt 0)

10+ Year Member



jatar_k - thankyou so much. What seemed like a difficult task for me was made simple by your post above.

jatar_k

10:06 pm on Mar 27, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



glad to help