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
1. Set phpMyAdminLanguage: Chinese Simplified (zh-utf-8)MySQL Character Set: UTF-8 Unicode (utf8)MySQL connection verification gbk_chinese_ci
2. When creating a databaseSet it to gbk_chinese_ci.
3. Create a table using SQLEngine = MyISAM default
Export the entire database from the MySQL database:
1. Export the entire database
Mysqldump-u username-P Database Name> exported file name
Mysqldump-u wcnc-P smgp_rj_wcnc> wcnc. SQL
2. Export a table
Mysqldump-u user name-P database name Table
For some database queries, you not only want to get the query results, but also want to conveniently count the number of records in the query results. My usual practice is:$ Q = "select * from $ fromTable where $ where limit $ start, $ pageSize ";$
Original article: http://dev.mysql.com/doc/refman/5.5/en/innodb-default-se.htmlBest Practices for InnoDB TablesIf you have been using InnoDB for a long time, you already know about features like transactions and foreign keys. If not, read about them
Method 1:
Log on to the MySQL Server using the MySQL Adminstrator GUI Tool, but the Server returns the error message Host '60-248-32-13.hinet-ip.hinet.net 'is not allowed to connect to this
MySQL server
This is because of permission issues. The
1] how to create a management user for the mysqld database?
After the database is installed, we should create a management account for the mysql database. To set the root user as the administrator, we should run the following command;
[Root @
This article provides a quick and detailed understanding of the select statements in the MySQL database.
The basic syntax of the SELECT statement in MySQL is:
The following is a reference clip:Select [straight_join] [SQL _small_result][SQL
The main responsibility of daily management is to manage the running status of MySQL server program mysqld, so that database users can smoothly access the MySQL server. The following are the main responsibilities of this job:
Server startup and
Yesterday I encountered a problem in the MySQL replication experiment:
Database Version: 5.5.21-logOperating System: windows xp
For master/slave replication, autocommit = 0 binlog-format = mixed tx-isolation = read-committed
Experiment
Link: http://imysql.com/node/298
I have previously written about how to obtain MySQL procedure results through PHP. However, this method cannot adapt to multiple result sets. A multi-result set refers to multiple SELECT queries and multiple result
Sometimes, you do not want the stored procedure to throw an error and stop the execution. Instead, you want to return an error code.
MySQL
Supports exception handling by defining
Continue/exit
Exception Handling
Handler
To capture
Sqlwarning/not
Drop table if exists Article;
Drop table if exists Board;
Drop table if exists User;
/* ===================================================== ======================================= *//* Table: Article *//* ===========================================
I have been using Oracle databases all the time, so when designing CDM, the primary keys of tables not selected will automatically grow. This is only available in SQL Server and MYSQL. In Oracle, SEQUENCE is generally used to handle the problem of
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
[Compile]
Innodb is compiled as a plug-in by default in the form of Dynamic Links (*. so). You can./configure -- help | less to view details.
After installation, it will be placed in./lib/mysql/plugin. The parameters will be loaded later: --
When inserting Chinese data into mysql5.0 on the page, the system prompts "failed". Copy the SQL statement to the manager, and the database prompts "data too long for column" title ". I changed it to a Chinese character, the system still prompts the
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