I ran into an issue running the LOAD DATA INFILE command from a PHP script the other day. When I logged in as ROOT and executed the script on MySQL Query Browser it worked like a charm. However, when I executed the script from PHP as another use with only SELECT, INSERT, UPDATE and DELETE premission the script failed saying the user does not have enough rights to perform the operation. According to the documentation if the client and server are on the same machine you use the LOAD DATA INFILE form to bulk insert data. However this requires that FILE permission be granted to the user, which is obviously a possible security risk. There does exists a simple work around to this however use the following form of the statement:
LOAD DATA LOCAL INFILE …
This form of the statement should be used when the client and server exists on different machines but works just as well if they are on the same machine and removes the need for the FILE permission.
A friend of mine recently had an issue while installing MySQL 5.1.34 on a Windows 2003 R2 system using the binary installer. All seemed to have gone well with the install except that when it was done he couldn’t log into the database as root. Obviously, we thought that the password was wrong, so we tried to reset it using mysqladmin using the command:
c:\> mysqladmin -u root flush-privileges password <new-password>
However this did not work, even after restarting with the –skip-grant-tables option set. So the next course of action was to re-install. The current installation was removed using the uninstall option and the mySQL folder created on the C:\Program Files folder was junked.
The re-install started with no problems but curiously remembered all the previous settings (sign of problems to come!). The install completed but configuration failed with the wizard unable to apply security settings because the password was incorrect. Apparently it seems that the password is stored somewhere that was not removed in the previous uninstall.
In the end the following steps worked for completely removing and re-installing:
- Perform un-install using wizard
- Manually remove the service if still installed
- Delete folder C:\Program Files\MySQL
- Delete C:\Windows\my.ini
- Delete the MySQL folder in Application Data. The actual Application Data folder will depend on the user performing the installation
- Re-install
21 Apr, 2009
Posted by: Donnie Bachan In: Business
I’ve teamed up with Rolling Star Limited, an email marketing and sms marketing firm based in London, UK to perform integration services between their top notch email and sms platform and third party CRM systems. RSEmail is a full featured platform with a powerful feature set that allows you to perform very advanced email and sms campaigns. The system also provides a rich API which can be used to integrate the product with external systems. It is 100% rebrandable and contains advanced reporting.
I love doing integration work. Many people talk a lot about web services but don’t really know or have the resources to implement or make use of them. So you have an API and another company has an API, what now? I write the bridge that links these two APIs. Although the data formats exposed by most web services is standard the APIs themselves are not standard and can sometimes not be as straightforward to work with.
So, do you need an email or sms marketing platform? Give Rolling Star Ltd (i...@rollingstar.co.uk) a shout and if you need it to integrate with your system or vise versa, contact me (donn...@gmail.com) and I’ll be happy to work with you to get it up and running!
I know this is a bit off topic but I felt I had to write about my trip to Paris, France. I’m not the most travelled person in the world but I have to say that Paris has to be my favourite city so far. Sure it was for vacation and maybe if I lived and worked there I may not feel that way but you just get the feeling that there is something special about that city. It truly is a very beautiful place.
I had the opportunity to stay in the best hotel in the world! Hotel Jules on Rue LaFayette is a design hotel in Paris and one of the world’s most exquisite locations. What does it mean by design hotel? Well just look at the photos on the site and you will see. The very slick interior design is very pleasing and very chic. The staff is temendous and the hotel itself is superb. It really was one of the highlights of the trip. It is located about 10 minutes from Gare du Nord train station. If you would like a really nice place to stay, I strongly recommend this hotel.
Paris is a city for walking. From the hotel it was a straight trek down to the Arc de Triomphe which was our first stop. After visiting that monument we hopped on the metro over to the Eiffel Tower. The lines were daunting but you can’t come to Paris without going up the tower. We decided not to go up to the third floor because that was an additional 60 minutes to get up there and after having spent an hour to get tickets we really weren’t going to do that. Here’s a tip, get tickets in advance when you want to go. The view was awesome. we could see all of Paris from the second floor. We even caught a glimpse of the Statue of Liberty (yes, there really is one in Paris as well). It is much smaller than the one in the US but it really is a bit strange when you see it there the first time. Next we did a cruise on the Seine. I would recommend taking this trip at night as well as the day. The history of this city is truly amazing. After a long day out we had dinner in a superb little cafe, Au Petit Riche. The service was wonderful and the food excellent and the prices were not that bad. Paris is expensive. Eating out can cost you so be aware of this when you are budgeting.
The second day had miserable weather. It drizzled all day long. We, however, went indoors and visited the Louvre. This was the highlight of the trip for my wife, who is a huge Da Vinci Code fan. There wasn’t much of a croud and getting in was quite quick. I like the ticket machines, this makes things very efficient. The most crouded part of the museum was the Italian Painters section and of course the painting of the Mona Lisa. We had to slither through to get a picture. But in the end my wife was happy to see it up close (well as close as they would let you get to it, which is about 10 feet away).
One thing to note for people with young children (under 12) most attractions are free, which I think is a huge plus because the cost of taking the kids is basically the cost of transportation and lodging.
Visiting Paris is one of those things you must do once before you die. I intend to return for a longer time next time, time to start saving! 
12 Apr, 2009
Posted by: Donnie Bachan In: General
I am one of those people who doesn’t generally upgrade to the latest version of software just because a new version is out. I take security seriously so I do patch my OS and perform updates when they include a security fix but other than that, if something is working great I leave well enough alone. Today I decided to upgrade to the latest stable version of the Filezilla FTP Client. I have been using this for a long time now and I love the program, it just works and that makes me happy. While exploring the spiffy new interface I noticed a new icon on the toolbar called “Synchronised Browsing” and let me tell you this feature alone will cause me to never use another FTP program!
Synchronised Browsing mode automatically switches the remote directory to the currently selected local directory (and vice versa). This will save me so much time when I’m doing quick updates that aren’t deployed via more automated build mechanisms. I am not sure if this feature is available on other FTP programs but I can tell you this will (and already has) saved me a lot of clicks and frustration.
Excellent job Filezilla team!