Posts Tagged ‘mysql’

CentOs上安装Apache服务器,Mysql数据库,PHP环境常用的命令

Monday, March 8th, 2010

由于公司服务器是CentOS的,所以需要在本地测试一个项目,然后就下载6个ISO在VirtualBox里安装成功。但还需要安装LAMP (Linux, apache, php, mysql)才能开始项目,因此就试着用Ubuntu的命令进行安装,但发现很多命令不尽相同,特发此文留个记录。

CentOS is an Enterprise-class Linux Distribution derived from sources freely provided to the public by a prominent North American Enterprise Linux vendor. CentOS conforms fully with the upstream vendors redistribution policy and aims to be 100% binary compatible. (CentOS mainly changes packages to remove upstream vendor branding and artwork.) CentOS is free.
(more…)

import csv file into mysql database with phpMyAdmin

Thursday, March 4th, 2010

When you start to design website for your client , and sometimes your client will give you a csv or txt file which include large data in it . so you should import it into database and use it. which way is the best to do this? I think phpMyAdmin is the best choice. The example is that a client provide a txt file , exported with CSV formate . and they want to these data into the database and query online store in the website.
First , see the csv or txt file , make sure all the line is the same type, like this :
"14 Carrot Whole Foods Inc.","5300 Sunset Blvd.","Lexington","SC","29072","803-359-3920"
"365 Nutrition","1205 Johnson Ferry Rd.","Marietta","GA","30068","770-509-3644"
"4 Goodness Sake","3538 Route 309","Orefield","PA","18069","610-398-2057"
"A & A Health Foods","99 Godwin Avenue","Midland Park","NJ","07432","201-447-3130"

Then analyze the file and make sure the content for field in database. see above, and you will know that the filed order is :
(more…)