Requirement: There are three tables, student table, teacher table, and association table. The number of students in the instructor table must be dynamically updated when a student is added.
First, create three tables.
Student table
Instructor
Open the command line window and stop the MySQL service:Net stop MySQLStart mysql. Generally, go to the MySQL installation path and find mysqld.exe.Run: mysqld-NT -- skip-grant-tables. The current window will stop.In addition, open a command line
Mysql Oracle official download type exclusive seems a headache for us to choose
Download MySQL Community Server
Http://dev.mysql.com/downloads/mysql/
On this download site, select the platform "CMDL & red hat liunx 5 ".
Select installation package
In Soundbreak, we play live audio and video continuously 24 hours a day, so we cannot make a convincing test of the new replication feature of MySQL. Through tests, we found that this feature can be used to maintain data synchronization with the
1. Download mysql -XXX.tar.gz first
2. Unzip the tar zxvf mysql-3.22.32.tar.gz
3. cd mysql-3.22.32
4. The installation directory is not fixed:./configure -- prefix =/your path/mysql
5. make
6. make install
7. cd scripts
8 ../mysql_install_db
When you connect to a MySQL server, you should usually use a password. The password is not transmitted in plain text on the connection.
All other information is transmitted as text that can be read by anyone. If you are worried about this, you can
Use mysqldump of mysql database for automatic backupDate: 2004/07/30 Author: zcatlinux Source: zclinux
Mysql database mysqldump can be used for database backup. If crontabs is configured in linux, automatic backup can be implemented!
#! /Bin/bash#
1. Installation
Sudo apt-Get install mysql-server mysql-Client
2. Restart, start, and stop
Sudo/etc/init. d/MySQL restart | START | stop
You can also use this command to shut down the database mysqladmin-u root-p123456 shutdown.
3. Add and modify
I accidentally deleted the root user of mysql and found a lot of solutions on the Internet. Due to the large number of mysql databases and the trouble of reinstalling them, I have been trying various methods, finally, it succeeded. The procedure is
Install MySQL server and client
$ Sudo apt-get install mysql-server mysql-client
Install MySQL graphical Management
$ Sudo apt-get install mysql-workbench
To access the MySQL database using C language, you must also install the
1. Cause of error: modified the MySQL configuration file my. ini.
2. Check the error:
Some code of the my. ini configuration file:
[Mysqld] # The TCP/IP Port the MySQL server will listen on Port = 3306 # path to installation directory. all
During the stress test of the Game Database today, after running the test case for a period of time, I found that the client could not actually log on. After positioning, I am now full of MySQL BINLOG logs, as a result, MySQL cannot work normally. I
L max_connect_errorsThe default value of max_connect_errors is 10, that is, the mysqld thread has not been restarted. A physical server can no longer connect to the mysqld service as long as the connection exception is interrupted for more than 10
This is the setting in WIN. Please change it slightly in LINUX:
JSP lab environment Configuration1. Prepare toolsJDK 1.5: http://java.sun.com/j2se/1.5.0/download.jspTOMCAT version 5.5: http://tomcat.apache.org/download-55.cgiMYSQL version 5.0: http:
I didn't get it done last night. I got up in the morning!
In the original table, the ID in the account is not automatically added. When someone else registers an account, the ID needs to be set. This is very bad, so the ID
If this parameter is set
Problem:
MYSQL displays normal Chinese characters on the command line terminal, but garbled characters are displayed in JSP calls!Display garbled characters with JSP query, with (new String (string. getBytes ("ISO-8859-1"), "gb2312") or show
Fedora16 mysql
ServerStart
16:32:50 | category:Linux/Unix | font sizeSubscription
From Fedora16, ntsysv, chkconfig, and service are no longer recommended for Redhat, but new service management tools are recommended.Systemctl (seemingly powerful)
How to modify the default Character Set of mysql
From: http://database.51cto.com/art/201010/229167.htm
Can the default mysql Character Set be modified? The answer is yes. Here are two ways to modify the default Character Set of mysql. I hope you
Delete Anonymous UsersAfter MySQL is installed, a user with a blank username and password exists. This makes it possible for the database server to be logged on without a password. Delete anonymous users to eliminate potential risks. [Root @ sample ~
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