Re: Location of text file for loading data in to table
Hi, I am having problems loading data into a table and have 2 questions. 1) I want to load some data from a text file in to a table by using the following line: LOAD DATA LOCAL INTO st.txt INTO TABLE studio; With this you have to save your text file inside the bin folder of your mysql folder e.g c:\mysql\bin. For it to work. this keeps giving me : File st.txt not found (ErrorCode: 2) Where should I store the st.txt file. I am using Windows and have mysql stored at c:\mysql. I have tried putting the file in the following locations: C:\mysql, C:\mysql\data, and C:\mysql\data\[DATABASE NAME](where the tables are stored) But keep getting the error. On the other way we just specify the full pathname to the file. If it's in D:\tmp\text.txt, use: LOAD DATA LOCAL INFILE D:\\tmp\\text.txt INTO TABLE tabname; Or: LOAD DATA LOCAL INFILE D:/tmp/text.txt INTO TABLE tabname; (courtsy : Paul DuBios) I'm using the same arrangement and found I had to put my data files under my cgi-bin directory. But when I upload the code to my ISP, they can be stored in the same directory as the script. This tells me it is likely a configuration thing. -- Amer Neely [EMAIL PROTECTED] Softouch Information Services: www.softouch.on.ca/ Perl / PHP / CGI programming for shopping carts, data entry forms. We make web sites work! - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
LOAD command failed if the Local infile is not \bin
Hi, I just discovered that I have to move the data text file I want to store in my table into bin directory of mysql directory (c:\mysql\bin\) before the LOAD DATA local infile text.txt INTO TABLE tabname can work. The problem here is that how do I then transfer this kind of file from my local computer if at all i am able to connect to mysql server at the remote machine. Regards. kamal - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: SELECT INTO LCOAL OUTFILE
ello Paul, can you try this and let see if it is going to work ! UNLOAD DATA FROM TABLE fred INTO LOCAL OUTFILE file.txt; And if it fails, i am sure somebody their will correct it! Regards. kamal Hi, Is there a reason why, if I can LOAD DATA LOCAL INFILE 'file' INTO TABLE fred; why I can't SELECT * INTO LOCAL OUTFILE '/tmp/file.txt' FROM fred Because it's just never been implemented. I know the data has to travel to the client, but it would make scripting easier! - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: connecting to mysql from different computer
I suspect that you need to add an entry at the MySQL host for the machine that you are connecting from. This can be done with a GRANT statement: - Format: grant all privileges on databaseName.tableName to 'userName'@'hostName' identified by 'somePassword'; - Example: grant all privileges on myDB.* to 'clyde'@'coolPlace.org' identified by 'secretPass'; Then you'll need to reload the access privileges. It can be done at the command line like this: % mysqladmin -u rootUserName reload Remember, you may need to add the -p switch and suply a password for this command. Is this enough info? One more important question, if these privileges are now granted, will it then be possible for me to connect from MySQL client at the local machine to MySQL server at the remote machine? More so will i need to open MySQL server on my local machine before running MySQL client to connect to the remote machine e.g. c:mysql\bin\mysqld c:mysql\bin mysql -h coolPlace.org -u clyde -psecretPass Or I will just run the MySQL client to connect to remote machine without neccessarily running MySQL server at the local machine c:mysql\bin mysql -h coolPlace.org -u clyde -psecretPass Thanks for giving me relieve. -kamal. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
How to create clients option file !!!
Compliments, I was able to uccessful install MySQLGUI version 1.75 on my win 98 running MySQL server 3.23.43 -max-debug client version 3.23.3 alpha. I was also able to connect to the server. At the bottom of the window I saw one button with plus sign, when I do mouse over on it there is this pop msg ; you have not created client options file, which is highly recommended. Pls, how do i create this and of what important is the file. Regards. kamal. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: connecting to mysql from different computer
At 03:23 PM 12/10/01 -0700, you wrote: From: Dan [EMAIL PROTECTED] I can connect... on the same computer ...different machine it won't work. I have a similar problem but let explain better may be i don't get what Dan was talking about. From my local computer i can use LOAD command to store values into tables on the same machine. Now I want to be able to do the samething on mysql server at the remote site if i can successful connected to Mysql server on the remote machine. Can this sovle my sleeplessness problem? if not is there any assist you can render to me. Any support will be highly appreciated. Thanks in anticipation for your reply. Best regards. Kamal I suspect that you need to add an entry at the MySQL host for the machine that you are connecting from. This can be done with a GRANT statement: - Format: grant all privileges on databaseName.tableName to 'userName'@'hostName' identified by 'somePassword'; - Example: grant all privileges on myDB.* to 'clyde'@'coolPlace.org' identified by 'secretPass'; Then you'll need to reload the access privileges. It can be done at the command line like this: % mysqladmin -u rootUserName reload Remember, you may need to add the -p switch and suply a password for this command. Is this enough info? --- Rodney Broom Programmer: Desert.Net Spam filter: sql database - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Connecting to mysql server in a remote site and using LOAD command
Dear All, I have Mysql server installed at remote site which i need to connect to. I have tried this from my local computer but didn't work; c:\mysql\binmysql -h myhost -u myusername -pmypassword I will also like to use LOAD command to load a text file from my local computer to the database on this mysql server at the remote site. I have been able to achieve both actions from my local machine. I am using win 98, Mysql 3.23 All supports to get these done will be appreciated. Thanks to you all. kamal. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php