In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
How to load MYSQL database quickly, I believe many inexperienced people are helpless about this, this article summarizes the causes and solutions of the problem, through this article I hope you can solve this problem.
Quick load MYSQL database
Mysql is a small database server software that is ideal for small (but not necessarily small) applications. In addition to supporting standard ANSI SQL statements, it supports multiple platforms. On unix systems, however, the software supports multithreading, resulting in fairly good performance. For non-Unix users, it can run as a system service on Windows NT or as a normal process on Windows 95/98.
For Windows 95/98, the actual database is created by typing the following command in DOS: MYSQLadmin -u root create mydb, where the-u option tells MySQL that we are using the default root user, thus creating a database named "mydb".
Before reading data from MySQL database, we have to put some data into database first. At this stage, there is no easy way to do it. Unfortunately for Win32 users, to do some work under DOS, you have to use the DOS window: type "MySQL" at the DOS prompt, the welcome message and "MySQL>" prompt appear, and then type "use mydb" to start using our new database, and then create the name and data structure of the data table (file) and add data to the data table. In this process, any wrong input can produce errors, resulting in a failure and having to start all over again.
To avoid this, we need to do something else. Here is an example of an employee database that everyone likes to use. We can add data like this:
Copy the following text into a file and store it in MySQL's bin directory (I assume the file name is mydb.dump).
CREATE TABLE employees (id tinyint(4) DEFAULT '0' NOT NULL AUTO_INCREMENT, first varchar(20), last varchar(20), address varchar(255), position varchar(50), PRIMARY KEY (id), UNIQUE id (id));
INSERT INTO employees VALUES (1,'Bob','Smith','128 Here St, Cityname','Marketing Manager');
INSERT INTO employees VALUES (2,'John','Roberts','45 There St , Townville','Telephonist');
INSERT INTO employees VALUES (3,'Brad','Johnson','1/34 Nowhere Blvd, Snowston','Doorman');
If the text is broken, make sure that each INSERT statement starts on a separate line. Now we're going to add the data to mydb database. At the command line, type the following command:
MySQL -u root mydb < mydb.dump
You shouldn't have any mistakes at this point. If there is an error, please check carefully whether the above text breaks caused the error. This completes the function of transferring the data table to the database, which is convenient to operate.
After reading the above, do you know how to load MYSQL database quickly? If you still want to learn more skills or want to know more related content, welcome to pay attention to the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.