How to import Access and Excel to Mysql _ PHP Tutorial

Source: Internet
Author: User
Tags mysql host mysql odbc driver
How to import Access and Excel to Mysql 2. I. For Mysql database installation, database creation, and ODBC installation settings, you can download the Mysql and ODBC drivers on its home page (www.mysql.com), click LatestVersions on the right side, and download the latest version. Mysql database installation, database creation, and ODBC installation settings
Mysql and ODBC drivers can be downloaded on its home page (http://www.mysql.com/), click Latest Versions on the right to download the corresponding version. Here we want to download the Intel version of Mysql (the latest version is 3.23.40), ODBC driver is MyODBC 2.50.37 for NT/2000 (full setup), if you use Win95/98, the driver is different. please note the difference.
Then you can install Mysql. it is very simple to install mysql and decompress it to a directory (C: Mysql). in Win2000, Mysql can be run as a service in Windows, you can run "C: mysqlinmysqld-nt -- install" plugin in the command line. in this case, you must enter a password. this is the Mysql connection password. please remember, the default connection has no password (the user is root ).
The database and table are created. to export the data in Access and Excel, the table must contain all the fields of the two. for simplicity, only some fields are selected for description. run cmd to go to the command line mode, switch to the c: mysqlin directory, and execute "mysqladmin create build". This command creates a database, build is the name of the database. after the database is successfully built, run "mysql" and go to the "Mysql>" command line mode and run the following command:
Mysql> use build;
Mysql> create table loupan (
Id int (10) unsigned not null auto_increment,
Loupantype varchar (6 ),
Inputdate date,
At_whatsection varchar (6 ),
Buildname varchar (50 ),
Buildaddress varchar (50 ),
Room tinyint (4 ),
Hall tinyint (4 ),
Areasize decimal (10, 2 ),
Exp_sellprice decimal (13, 2 ),
Ownername varchar (20 ),
Contactway varchar (50 ),
Apsaradb for memo varchar (255 ),
Updatestatus char (1 ),
Goodloupan char (1 ),
Primary key (id)
);
Then the Query OK and 0 rows affected (0.04 sec) success prompt will appear. in the previous article, use build indicates that the current database is switched to build, and the subsequent statement is the table creation command, the field indicates the ID number from top to bottom (automatically add 1 and it is the primary key of the table) type of the project, input date, region, name, address, number of rooms, number of halls, area, expected price, owner's name, contact information, and remarks, update status, and the icon of the disk.
The next step is to install the Mysql ODBC driver. the installation of MyODBC is also silly. run setup and confirm it step by step. After that, you can set it in the ODBC data source on the control panel. click "system DSN", select "Add", and select "mysql" in the driver list ", A configuration page is displayed. in Windows DSN Name, enter the Name of the data source. here, enter build (other names can also be entered, not necessarily the same as the database Name ), in "MySQL host (name or IP)", enter "localhost" to indicate that Mysql runs on the local machine, and enter the Database Name "build" in Mysql Database name ", enter "root" in User, and enter the PassWord you just set in PassWord. if you haven't set the PassWord, leave it blank and press "OK, A "build" is added to the system data source, so that the ODBC data source of Mysql is successfully set.

Bytes. Mysql database installation, database creation and ODBC installation settings Mysql and ODBC driver can be downloaded on its home page (http://www.mysql.com/), on the right of the Latest Versions click in, download phase...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.