Scene:A CSV file that contains student details for multiple departments requires inserting the contents of a file into a data table, ensuring that each system generates a separate ranking list.
The data for the Learning Information table
Tuning Ideas:
1. Database design and planning-it's a hassle to fix it later, estimate the amount of data, what storage engine to use
2. Application of data--how to fetch data, optimization of SQL statements
3.mysql Service
A while ago, and student participation in the final completion of the project, the main project is to do a report that involves a lot of SQL statements, so take the next rollup.I. Foundation 1. Database-related commandsA> Create a databaseCREATE
Recent project development using MySQL, go to the official website to see MySQL there are two ways to install: One is the MSI format, one is in the zip format. Personally prefer the zip, that is, the decompression version, in other words, the green
Stop MySQL Repair* Sudo/etc/init.d/mysql stop
Copy of the original folder* cp-r/var/lib/mysql/home/yourname/somewhere
Change permissions* sudo chmod mysql:root/home/yourname/somewhere/mysql* sudo chmod 777/home/yourname/somewhare/mysql
Phantom Read (Phantom read) is when a user reads a range of data rows, the B transaction inserts a new row within that range, and when the user reads the data row of that range, a new phantom row is found. The InnoDB and Falcon storage engines solve
1 , connect to this computer MYSQL . First open the DOS window, then enter the directory Mysql\bin, and then type the command Mysql-u root-p, enter after the prompt you to lose the password. Note that the user name can have a space or no space, but
MycliWe know that MySQL client tools do not have syntax highlighting and command completion of the function is really a bit inconvenient, to recommend a MySQL client tool with this function mycli can help us to do a better job more efficiently, The
To view the currently used database, use the following commandMysql> Select Database (); #使用函数database ()Mysql> Show tables; #列头信息中可看出当前使用的db in the format: Tables_in_[db_name]mysql> status; #注意结果中的 "Current database:" InformationSee what databases
/ * Trigger */------------------a trigger is a named database object that is related to a table, and when a specific event occurs, the object is activated for monitoring: Record additions, modifications, and deletions. --Create a trigger CREATE
query The MySQL process because the database has a lot of sleep connections (usually around thousands of), do not recommend direct show Processlist or show fullProcesslisttry to use Select querythe thread being runningSelect Count (*) from
Problem Recurrence (The following discussion is for Windows environments only):C:\appserv\mysql> Mysql-u Root-pEnter Password:ERROR 1045 (28000): Access denied for user ' root ' @ ' localhost ' (using Password:yes) edit mysql config file my.ini
/* Transaction (TRANSACTION) */------------A transaction is a logical set of operations that make up the units of this set of operations, either completely or unsuccessfully.- supports collective success or collective revocation of continuous SQL.-
1. Configuring the Main library (master)1. Edit the MySQL master configuration file (/ETC/MYSQL/MY.CNF):A) set the Server-id in the [mysqld] configuration section to 1b) open Log_bin at the same time (remove the # from the front of Log_bin to
In MySQL database programming, there are often some related attributes in several tables, and we can usually solve this problem by using FOREIGN key constraints. However, some minor problems occur when you delete a table and modify the structure of
Some basic commands:Login:Mysql-u username-pTo display all databases:show databases;Use a database:Use DatabaseName;Show all tables for a database:Show tables;Exit:Quitdeleting databases and data tablesMysql>drop database name;Mysql>drop table Data
Original address: http://chen-shan.net/?p=474In order to prevent SQL injection, we have used the Mysqli class, but each time we need to bind parameters, binding results and so on, it is more troublesome, so we can encapsulate these repeating
Exporting DataSaves the retrieved data to a file in the server.Pass:select * into outfile ‘文件地址‘ from xxx;select * from teacher_grade;select * into outfile ‘d:/testmysql/result‘ from teacher_grade;Note:You can create files automatically, but you
Project, the MySQL database was read and written and separated using Atlas.It was configured to read data from the library.When you connect the agent test with the database tool, everything is fine.When using the framework MyBatis database in a
Xunyu (nickname)Background: In view of the devastating damage to the QAS database, it was extremely sandy. In order to avoid this bath water situation again, we found a solution. Here to share how to implement a scheduled backup MySQL database
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