How to import Access and Excel to the second of MySQL

Source: Internet
Author: User
Tags date command line dsn odbc mysql mysql host mysql database mysql odbc driver
Access|excel|mysql one. MySQL database installation, build and ODBC installation settings

MySQL and ODBC drivers can be downloaded on their homepage (http://www.mysql.com/), latest versions on the right click in, download the appropriate version of the line. Here we want to download Intel version of MySQL (latest version 3.23.40), ODBC driver is MYODBC 2.50.37 for nt/2000 (full setup), if the use of win95/98, the driver is different, please note the distinction.

Then it can be installed, the MySQL installation is very simple, unzip it to a directory (C:\mysql), in Win2000, MySQL can run as a service of Windows, run on the command line "C:\mysql\bin\mysqld-nt- Install "and then in the service of the WIN2000 management tool we can find that there is a MySQL service running, However, I found that the direct operation of Winmysqladmin.exe is also possible, at this time will require a password, this is the MySQL connection password, please remember, the default connection is no password (user for root).

Then you set up the database and the table, because you want to bring the data in Access and Excel to the table, so you want to include all the fields in both, for simplicity, just select some of the fields to illustrate, run cmd into the command line, switch to the C:\mysql\bin directory, and execute the Mysqladmin create build, which is the creation of a database, the name of the database, after the successful execution of "MySQL", Into the "mysql>" command line, execute the following command:

Mysql>use build;

Mysql>create TABLE Loupan (

ID Int (a) 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),

Memo varchar (255),

UpdateStatus char (1),

Goodloupan char (1),


PRIMARY KEY (ID)

);

And then there's query OK, 0 rows affected (0.04 sec) Success Tip, the use build above indicates that the current database is set to change, and then the statement is a table-building command, and the field is represented by an ID number (automatically plus 1 and the primary key of the table). , the type of property, the date entered, the region, the name of the real estate, the address, the number of rooms, the number of halls, the area, the expected price, the owner's name, contact method, remark, update status, Bamboo shoot plate mark.

Next is the installation of MySQL ODBC driver, MYODBC installation is also a fool, run the setup, step-by-Step confirmation. When you are finished, you can set it in the ODBC Data source in Control Panel, click System DSN, select Add, select "MySQL" in the list of drivers, and a configuration page pops up, and the name of the data source is entered in Windows DSN name. Enter build here (you can also enter a different name, not necessarily the same as the name of the database), in "MySQL host (name or IP)", enter "localhost", indicating that MySQL is running on this machine, in the MySQL database Name enter the name of the database "build", user input "root", password input just set the password, if there is no setting, leave blank, press "OK", will be in the system data source in a "build", This allows MySQL's ODBC data source to be set successfully.

Related Article

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.