We all know that it is easy to sort SQL statements in MySQL by adding an "order by table. name ASC "well, but this only applies to English and numbers, because we generally build the library is UTF-8, the sorting rule is generally" utf8_general_ci
64-bit SystemThere are two installation packages: mysql-5.1.66-winx64 and mysql-essential-5.1.53-win32.
Mysql-essential-5.1.53-win32: contains the basic installation package,Helpful documentation
Mysql-5.1.66-winx64: contains the basic
I wrote a small example using C language to operate MySQL.
ProgramConnect to the database first, insert a piece of data into the class1 table, and finally obtain and output the content of the entire class1 table.
UpperCode:
// Test. C //
1. scenario: the MySQL database is on the slave machine, the slave machine is on the LAN, the SSH host is required, and then the SSH slave machine (the slave machine) is on the client machine) similar to the following Architecture
As a
Start configuration and click Next, as shown in figure 10.11. jpg(39.41 KB)
Figure 10
Select detailed configuration, as shown in Figure 11. Click Next to continue.12. jpg(47.15 KB)
Figure 11
The following option selects the type of MySQL application.
1. Stop the running MySQL process
In Linux, run killall-term mysqld
In Windows, if it is written as a service, you can run: net stop mysql. If it is not loaded as a service, you can directly close it in the Process Manager.
2. Start MySql in
The following provides some simple steps to teach you how to use PHP to connect to the MySQL database in resin. For more information about how PHP runs in resin, see another article on using PHP in resin.
The procedure is as follows:
1. Download
After the variable binding problem is solved, the rest is much simpler.
The expected working mode is as follows:
Objective: To solve common MySQL access problems.
It is often used to select a single row and obtain multiple rows.
The Select
Previously thought from top to bottom unified use of UTF-8 on the rest of the peace of mind, which knows today in the capture of Sina Weibo data or encounter character exceptions.
An exception is thrown when the data captured from Sina Weibo is
Fedora8 MySQL startup error:Error 2002 (hy000): Can't connect to local MySQL server through socket '/var/lib/MySQL. Sock' (2)1. Check/etc/rc. d/init. d/mysqld status to see if m y s q l has been started.Check whether the permission is correct.2.
Method 1:
Go to the MySQL installation directory and open the MySQL configuration file my. ini or my. CNF to find max_connections = 100 and change it to max_connections = 1000 to restart MySQL.
Method 2:
The maximum number of connections for MySQL
For statements executed multiple times, preprocessing is faster than direct execution, mainly because only one parsing operation is performed on the query. In the case of direct execution, the query is performed each time the statement is executed.
This is a stored procedure used to copy the value of the avalue column in table A to the bvalue column in table B (assume that both table A and table B have the same column named ID)
Create procedure copy_field () begindeclare TID int default 0;
Introduction: The native C language API of MySQL is a little difficult to use (especially when obtaining query results), so I made a simple encapsulation for it to make it easier to use.
Header file: mysql_control.h
# Ifndef mysql_control # define
When using MySQL, you often need to use MySQL without installation (green version). I searched a lot on the Internet, but it is really not easy to use.
I had to think about it myself and share it with you:
// Install and start the service
@
1. select the most suitable field attribute
MySQL can support access to large data volumes, but generally, the smaller the table in the database, the faster the query will be executed on it. Therefore, when creating a table, we can set the field
-- Introduction
The execution efficiency of PHP is obvious to all, which is one of the reasons I like it. To integrate it with MySQL and Apache, which is called a wonderful partner, we can't help but wonder at its efficiency. PHP is also updated
This article describes in detail the MySQL order by rand () Efficiency optimization solution, and provides the optimization process. It is a rare MySQL order by rand () Efficiency essay.
Recently, we have studied the implementation of MySQL random
The following content is from:Http://blog.sina.com.cn/s/blog_6568e7880100toi9.html
Cause: libmysqlclient-Dev is missing,Install: APT-Get install libmysqlclient-Dev
Main. cpp
# Include # Include # Include Using namespace STD;
Int main
The following content is from beginning Linux Programming
C. Connect to MySQL
1. initialize a connection handle Structure
2. actually connect
# Include # Include # Include "mysql. H"Int main (char arc, char * argv []){MySQL * conn_ptr;
Conn_ptr
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