| |
|
If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
|
 |

05-27-10, 04:30
|
|
Registered User
|
|
Join Date: May 2010
Posts: 6
|
|
|
Where and How to Save at Mysql prompt
|
|
Dear expert,
I am forced to learn Mysql because almost web hosting company use it.
At the mysql command prompt, I typed CREATE TABLE followed by table name, then I entered. After that, I continued typed out the database fields, specifying varchar etc Not Null until the end.
Then, I want to save my table to a place but I do not know how-to.
Even when I typed shows table followed by the table name...there's nothing.
Mysql is residing in my XP....so I'm not sure if my following syntax is wrong :-
mysql > mysqldump - u username -p password databasename.
Is username and password created here in above line ?
Hope some one can tell me how to. Many thanks.
|
|

05-27-10, 07:05
|
|
vaguely human
|
|
Join Date: Jun 2007
Location: London
Posts: 2,519
|
|
Quote:
|
I want to save my table to a place but I do not know how-to.
|
You could just put all your table creation SQL into a file then run that file through MySQL. Not sure what you edit the sql with but most editors allow you to save the file using a file name. Alternatively you could just rely on MySQL to provide you with the script when enter :
Code:
show create table YourTableName
If you have some objection to learning MySQL then why not just use a different RDBMS?
|
|

05-27-10, 11:07
|
|
Registered User
|
|
Join Date: May 2010
Posts: 6
|
|
|
|
What editor ? My version didn't come with an editor. I have to do everything at mysql command prompt.
Whereabout do I create the directory for me to stored the tables?
|
|

05-27-10, 11:14
|
|
Registered User
|
|
Join Date: Nov 2003
Posts: 2,407
|
|
Quote:
Originally Posted by tangara
What editor ? My version didn't come with an editor.
|
But your operating system has a text editor.
|
|

05-27-10, 12:20
|
|
Registered User
|
|
Join Date: May 2010
Posts: 6
|
|
Do you mind to be more explicit. I know nuts about MYSQL...Been trying to put up my website for 3 coming to 1 month already but because my database is not created in MYSQL and so have been delayed till now.
Please advise me where's the editor. Many thanks.
|
|

05-27-10, 12:33
|
|
vaguely human
|
|
Join Date: Jun 2007
Location: London
Posts: 2,519
|
|
You mentioned you were on XP so you should have notepad.
Look under : Start > accessories > notepad
|
|

05-27-10, 21:10
|
|
Registered User
|
|
Join Date: May 2010
Posts: 6
|
|
So, you are saying I can actually create my tables at notepad and then save it there and then. I don't even have to use MYSQL in the first place at all.
Please confirm. If that is the case, it will be the greatest piece of News !
|
|

05-28-10, 05:34
|
|
vaguely human
|
|
Join Date: Jun 2007
Location: London
Posts: 2,519
|
|
Quote:
|
Originally Posted by tangara
Please confirm
|
Confirmed.
You will then need to pass the file through MySQL as this will create the tables etc. Most databases offer exactly this functionality and MySQL is no different. I'm sure someone could suggest a nice easy to use MySQL editor as well - sadly I can't as I use vim and I suspect you wouldn't like that at all.
|
|

05-28-10, 08:25
|
|
SQL Consultant
|
|
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,525
|
|
unconfirmed
notepad cannot store tables, you need mysql for that
all notepad will do for you is allow you to muck around with the sql that will then be fed into mysql to create the tables
are you sure you need a mysql database? why not build your web site in good old fashioned html?
|
|

05-28-10, 08:29
|
|
Registered User
|
|
Join Date: May 2010
Posts: 6
|
|
Great. I can create the files in notepad.
Could you confirm I just this files that I created in notepad and passed to the web hosting company? Is that all?
I have earlier tried EasyPHP to create those tables and save it in .csv format and mysql - unfortunately the format is Ms Query Server SQL so they don't accept it.
So, I just want to be sure things can be done so easily. Thanks.
|
|

05-28-10, 08:54
|
|
SQL Consultant
|
|
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,525
|
|
my advice is to install mysql on your own computer, build your tables there, test them thoroughly, etc., before passing anything to your hosting company
and notepad is pretty austere as a development environment, i suggest you use a tool like HiediSQL (free)
|
|

05-28-10, 10:25
|
|
Registered User
|
|
Join Date: May 2010
Posts: 6
|
|
Yes. I have tried HeidiSQL. The thing is that HeidiSQL just converted my files - the sql files that I have created using EASY PHP.
But, it changes the format to sql script.
Can you advise if this format is accepted by the web hosting company?
|
|

05-28-10, 10:41
|
|
SQL Consultant
|
|
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,525
|
|
Quote:
Originally Posted by tangara
Can you advise if this format is accepted by the web hosting company?
|
no, i can't
i don't know what format "easy php" generates, and i don't know what format your hosting company accepts
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|