How to import access and Excel into MySQL in the second _php tutorial

Source: Internet
Author: User
Tags dsn mysql host mysql odbc driver
One. installation, build, and ODBC installation settings for MySQL database
MySQL and ODBC drivers can be downloaded on their home page (http://www.mysql.com/), and on the right, latest versions Click in to download the appropriate version on the line. Here we want to download the Intel version of MySQL (the latest version is 3.23.40), the ODBC driver is MYODBC 2.50.37 for nt/2000 (full setup), if the use of WIN95/98, its driver is different, please note the distinction.
Then it can be installed, MySQL installation is very simple, unzip it into a directory (C:mysql), in Win2000, MySQL can run as a service of Windows, run "c:mysqlinmysqld-nt" on the command line-- Install ", and then in the service of the WIN2000 management tool we can find the MySQL service running, But I found that directly run Winmysqladmin.exe is also possible, this time will be asked to enter a password, this is the connection password of MySQL, please remember, the default connection is no password (user is root).
After that the database and the table are created, because the data in Access and Excel are to be introduced, so the table to include all the fields of both, here for the sake of simplicity, only selected some of the fields to illustrate, run cmd into the command line, switch to the C:mysqlin directory, execute " Mysqladmin Create Build ", this command is created database, build is the name of the database, after success, execute" MySQL ", go to" mysql> "command line mode, execute the following command:
Mysql>use build;
Mysql>create TABLE Loupan (
ID Int (ten) unsigned not NULL auto_increment,
Loupantype varchar (6),
Inputdate date,
At_whatsection varchar (6),
Buildname varchar (50),
buildaddress varchar (50),
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)
);
Then there will be a query OK, 0 rows affected (0.04 sec) success hint, the above use build means to switch the current database to build, and then the statement is a table-building command, the field from top to bottom represents the ID number (automatically plus 1, and is the table's primary key) , the type of the property, the date of entry, the region, the name of the property, the address, the number of rooms, the number of the hall, the area, the expected price, the owner's name, contact information, notes, update status, bamboo shoots logo.
followed by the installation of MySQL ODBC driver, MYODBC installation is also a fool-style, run Setup, step-by-step confirmation. After that, you can set it up in the ODBC Data source in Control Panel, point to "System DSN", select "Add", select "MySQL" in the list of drivers, and a configuration page will pop up, enter the name of the data source in Windows DSN name, Enter the build here (you can also enter a different name, not necessarily the same as the database name), in "MySQL host (name or IP)", enter "localhost", indicating that MySQL is running on this computer, the MySQL database Name enter the name of the database "build", user input "root", password entered the password just set, if not just set, leave blank, press "OK", will be in the system data source more than a "build", This way, the ODBC data source for MySQL is set up successfully.

http://www.bkjia.com/PHPjc/631144.html www.bkjia.com true http://www.bkjia.com/PHPjc/631144.html techarticle A. MySQL database installation, build library and ODBC installation settings MySQL and ODBC drivers can be downloaded on their homepage (http://www.mysql.com/), on the right of latest versions Click in, download the phase ...

  • 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.