In the development or testing environment when encountering MySQL-related failures, most friends may be posted through the Forum, QQ group discussion method to get help. This approach is one of the effective ways to get help. However, in the
ChkconfigChkconfig are often used when operating on the command line. It makes it easy to set up and query system services at different run levels. This can be mastered well, with proficiency, you can easily manage your start-up services.Note:
The ID of the new record found today with mysql_insert_id () is incorrect,Although the source code is found to have a transaction write problem, but the most fundamental reason is that I inserted the data ID type is bigint typeThe method to get
One
First you need to define a database interface function that can be saved as a single PHP page
functiondb_connect() {$result = new mysqli('数据库地址', '账号', '密码', '库名');//连接数据库if (!$result) { returnfalse;//连接失败 }
The fact is that three points of knowledge are integrated together. Includes how to access MySQL. How to generate an XML file and how to use it for WebService developmentAll right. Words don't say much. Direct Stick CodePackage Com.service;import
If you need to get the results of the MySQL query statement directly from the command line, you can use the-B and-n parameters to achieve the goal.Example: Gets the number of MySQL users.[[email protected] ~]# mysql-bn-uroot-predhat mysql-e ' select
Recently there is a server MySQL often crash, in order to further locate the problem, the MySQL core file function is opened, the following steps for reference"Open Step"1. Add 2 configuration options in the My.cnf
Since MSYQL does not have an Oracle sequence method, when using the MySQL self-increment ID field, you want to get the ID value of this insert for immediate use, in the MyBatis configuration as follows:INSERT into question (Name,majorid) VALUES
Move MySQL database directory today on Linux systemsThe configuration is as follows:/etc/my.cnf[Mysqld]Datadir=/home/mysqlSocket=/var/lib/mysql/mysql.sockAfter you change the configuration file, the following issues occur when you restart MySQL110222
From:http://www.jb51.net/article/51473.htmThis article mainly introduces PHP to get the MySQL new record ID value of 3 methods, generally use PHP with function mysql_insert_id () can be implemented, the other 2 ways to use the right for special
MySQL Database Settings master-Slave synchronizationFeatures of Master-slave synchronization:of logicof asynchronousThe role of master-slave synchronization1. Backup2. Read and write separationSteps for master-slave synchronization
Prepare
CACTI: Use a template to monitor mysql on a local server or another server
Mysql templates, online are using this address http://mysql-cacti-templates.googlecode.com has not been accessed
File currently downloaded:
CACTI: Use templates to monitor mysql and cactimysql on local or other servers
Mysql templates, online are using this address http://mysql-cacti-templates.googlecode.com has not been accessed
Google found this URL:
Introduction: http://www.percona.
MySQL templates, which are used online in this address http://mysql-cacti-templates.googlecode.com has not been accessedGoogle found this URL:Introduction Cheat:
At first, in the Internet to find a lot of template reference documents, are not suitable for their own environment, their own groping to find out, finally made.Thank you very much for the 51 technology "YANGZHIMINGG" provided by the monitoring
Mysql_get_server_info
Definition and usageThe Mysql_get_server_info () function gets about the MySQL server.This function returns the success on the MySQL server version, or the failure of false.Grammar
Mysql_get_server_info (Connection)
Parameter
There are always netizens asked me, how to call the MySQL stored procedure through PHP to get the returned result set? Indeed, MySQL's stored procedures greatly facilitate programming and improve efficiency. However, for those who are still using
First, use the statement:
Copy CodeThe code is as follows: mysql_query ("SELECT Max (ID) from T1", $link);
Using this method gives the highest ID value, which is the last value, but when a multilink thread, this maximum ID is not necessarily the
How PHP gets the stored procedure where MySQL has a return value with a query
Stored Procedures
CREATE PROCEDURE A (out B int)
Begin
Select 10;
Set b=3;
End
Php
$tsql. = "Call a (@b);";
$tsql. = "select @b;";
if ($mysqli->multi_query ($tsql)) {
if (
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.