I created a database in my server and managed to connect to test it. All’s well there.
Now, what I want to do is to have a search facility in my site to look for hotel chains that have hotels in specific cities.
The next step, I think, is to enter data into the database in the server (several hundred records. at least).
How do I do that?
I expect that I need to type in the records locally in my PC before uploading it to the server.
What do I need to do that, please?
if you’re using mysql, have a look at heidisql – if you’re using some other database system, there are equivalent front-end applications
create a local database, create a local table, insert your data there, test as necessary, then export/dump your table, link to your server, and import the dumped .sql file
all very easy with heidi
Yes, I’m using mysql. Elsewhere I was told that I needed a local server
(e.g. XAMPP for Windows EasyPHP DevServer 14.1 ampServer)
Is heidisql a local server?
Does this have to be identical to the one in the server, ir a can use any programme that I like, like Notepad with entries separated by a comma?
Sorry, but this is all new to me other than DOS stuff in the 70s and 80s…
I’ve been reading…
Could you confirm that I understood what I read and that I can write the table in Notepad, one record per line, with fields tab separated?
This would then, I hope, be in the right format to upload it to the server’s database via some method yet to be discovered by me using something like
LOAD DATA INFILE '/tmp/mydata.txt' INTO TABLE PerformanceReport;
Would this code be done in the server?
yes, LOAD DATA can be run on the server
but if you’re new, may i respectfully suggest you do everything on your PC until it is problem free
heidisql is a front end application to your mysql database (both local and remore server)
seriously, it’s a lot easier to work with tables and data when you do it locally
once the data is loaded and clean, you simply dump the table (it produces a file of INSERT statements) and then run that up to your server
Things are moving along. I downloaded heidesql but also CSVed. I wrote a few lines in Notepad++ and dragged the file to CSVed and it looks very nicely ordered in columns as in the server’s database.
Right now I am only testing with database that has just an invented record and there is no danger (i think) of doing any harm to y website.
What I would like to try now is to upload/import the file with half a dozen records into the database.
Apart from LOAD DATA I read that it can be done in the PC’s command line with something like this
mysql -u username_user -p username_db < /home/mydump.sql
is this ok?
Otherwise how do I run the other command from within the server?
It’s all new to me!
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.