Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I upload a file to MySQL database and view that file

Status
Not open for further replies.

newlearner2005

Programmer
May 9, 2005
32
US
Hello all,

I do not know how to upload a file to MySQL database and view the posting file on the webpage.
I followed the code on-line that show me how to upload, but when I click "browse" to open my file in local drive and click "upload". Nothing happen ! How can I view it on the web page to make sure it was saved in data base.
Could anybody help me ? I appreciate.
Thank you very much.
new learner.
 
first you need to create the table in the db with the columns in the same order as in the file that you have (csv format is best (or tab delimited))

There are two setting that can affect the mysql loads data, at the bottom of the load file page there are two radio buttons for data and data local. Choose one and if it doesn't work, then choose the other radio button and try again...if the load is successful, you should be able to browse to the table by clicking the table name in the left hand col

Bastien

I wish my computer would do what I want it to do,
instead of what I tell it to do...
 
Hello everybody,

Could you help me about this?

I know how to see MySQL databases by typing comannd
mysql> show databases;
And how to create table in the database ( example "mydatabase" is the name of database, and "mytable" is the name of the table)
mysql> use mydatabase;
mysql> create table mytable;
And I know how to see that table
mysql> describe mytable;

My question is:
By typing what command in DOS prompt, How to see the content of data I just insert to the table so that I can view, edit...
Thank you very much
new learner
 
'mysql -e "select * from tablename" database' should work. Same as entering the query at the MySQL prompt.
 
get yourself a nice gui interface...mysql has them, phpmyadmin is another...they will make you life much easier

Bastien

I wish my computer would do what I want it to do,
instead of what I tell it to do...
 
Hello Bastien,

Thank you very much for your help. But it did not work that way !
I typed (in DOS prompt)
mysql> show databases;
It show "mydatabase".
Now I want to see what content of each database. I do not know how ? Even I knew "mytables" in " mydatabase", I typed
as you said, the dash lines run thru all the screen for a while and stop.
Thank you very much for your help.
new learner
 
You can execute SQL commands at the mysql> prompt; it's not a full-screen interface. I'd suggest another product if you want to browse records. There's one or two on mysql.com, or you can use Access or other ODBC client.

What do you want to do? List tables? try "show tables". See the records in mytables? "select * from mytable". Don't like the dashes? "select * from mytable\G". There are a lot of things that you can do, but the command line isn't good for browsing data spreadsheet-style. Visit mysql.com to see what it can do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top