If the fields of the 2 tables are consistent and you want to insert all the data, you can use this method:
Code:
Copy Code code as follows:
INSERT into target table SELECT * from source table;
For example, to insert a articles table
How MySQL takes random data out of a tablePreviously discussed this problem in the group, the comparison is interesting. MySQL's syntax is really fun. They all want to use PHP to achieve random, but take out more than two times as if the query.
From a good message of the MySQL database operation class, beginners PHP friends can refer to the
Copy Code code as follows:
Class mysql{
var $querynum = 0;
Function Connect ($dbhost, $dbuser, $DBPW, $dbname = ', $dbcharset = ') {
if (
Put the code directly:
First, the code for the Index_test.jsp page is as follows:
Copy Code code as follows:
Request.setcharacterencoding ("UTF-8");
Response.setcharacterencoding ("UTF-8");
Response.setcontenttype
Problem: Use a thigh write remote tool to manage the MySQL database, found that all the data can be displayed, but can not be deleted, modified and so on.
Thinking: You can read the information in the database remotely, indicating that the current
MySQL supports one-way, asynchronous replication, in which one server acts as the primary server and one or more other servers act as the server . The master server writes the update to the binary log file and maintains an index of the log file to
It may be necessary to open up your own database to others in the course of developing a project, but in order to be safe, it is not possible to open other databases in the server. You can create a new user to open specific database permissions to
I hope you like MySQL for Windows uncompressed version of the installation of this tutorial, but also hope to help you successfully install MySQL.
1, the MySQL installation file is divided into two types , one is MSI format, one is in the zip
I have
Used backup methods are: mysqldump, mysqlhotcopy, backup TABLE, SELECT into
outfile, or Backup binary log (Binlog), can also be a direct copy of data files and related configuration files. MyISAM
Tables are stored in the form of files, so
1> the compressed file mysql-noinstall-5.1.6-alpha-win32.zip into a directory, set the Mysql_home in the environment variable, and add%mysql_home%\bin to path.
2> creates the My.ini configuration file, which reads as follows: [mysqld]
1, MySQL common commandsCreate database name; Creating a Database
Use DatabaseName; Select Database
Drop database name deletes databases directly, without alerting
Show tables; Show Table
Describe TableName; Detailed description of the table
Add
The following article mainly describes the MySQL database simple and practical optimization of the implementation of the specific methods, including how to regularly analyze and check the table, and how to properly optimize the table, the following
Apache Server Optimization
,PHP optimization
, mysql optimization
For program developers, the two most popular background databases are MySQL and SQL Server. The basic similarity between the two is the data storage and the query system.
There are many PHP integrated development environments, such as XAMPP, Appserv ... As long as the one-click installation of the PHP environment to build a good. But this kind of installation method is not flexible, the software's free combination is
A. Nginx boot up
1, create the script in the/etc/init.d/directory
Vim/etc/init.d/nginx
2, write the content of the script (the following copy into the corresponding changes in the installation path)
#!/bin/bash # nginx Startup script for the
Since he and he are the same team, so I am very familiar with his "neat" approach, for his many points of view I also very much agree; but there is a very incomprehensible place is the design of the database will always avoid the use of date/time
Method One
Using phpMyAdmin, this is the easiest, to modify the MySQL library's user table,
But don't forget to use the password function.
Method Two
Using Mysqladmin, this is a special case of the previous declaration.
Mysqladmin-u root-p Password
This problem occurs when the delete is followed by the condition.
Delete from table_name WHERE condition
When you delete data, the amount of space that the datasheet occupies does not change.
When you do not follow the conditions directly delete.
Working Environment Windows Server 2003, MySQL installation directory D:\MySQL, WinRAR installation directory C:\Program Files\winrar\winrar.exe
The path to the backup data store is the E:\ data backup, so let's start with the DOS batch command.
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