Access MySQL guide with ODBC interface
Current Author: Wang Mei (HeartIcy@163.com)
Date Created: January 15, 2003
Revised version: 1.1
MySQL's good and bad I think about it. I always think that this is not what a programmer or system designer should
A. mysql database
The code is as follows
Copy Code
$conn =mysql_connect ("localhost", "root", "123456") or Die ("database connection failed");mysql_select_db ("test") or Die ("Select Database Failed");;$sql = "SELECT *
Creating a Database
The code is as follows
Copy Code
CREATE TABLE IF not EXISTS ' tet ' (' id ' int (one) not NULL,' Name ' varchar (255) Not NULL,' URL ' varchar (255) Not NULL) Engine=innodb DEFAULT Charset=utf8;The
Today, after the bulk deletion of the Myiam datasheet, found that there is no recycling, after checking the data, found to be through the optimize table to reclaim spaceTest the following to establish a data table:
The code is as
MySQL thread pooling series one (thread pool FAQ)
First, what is the MySQL thread pool, and what is it for?The use of thread pooling can be achieved in the following two main purposes:1, in the large concurrency, performance will not be due to
Mydumper Installation
1, first install CMake, because this software to use CMake compile
The code is as follows
Copy Code
# Apt-get Install CMake
2, the next installation Mydumper compatibility package, this
1, install the MySQL 5.5.x yum sourceRPM-UVH http://repo.webtatic.com/yum/centos/5/latest.rpm2, the installation of MySQL client Support package:Yum Install libmysqlclient15--enablerepo=webtatic3, uninstall the old version of MySQL software
PHP Tutorial Small Database Tutorial (do not use the MySQL tutorial to do the website)Include ' pdbm.php ';
$timestart = Explode (', microtime ());$timestart = $timestart [0] + $timestart [1];
$PDBM = new pdbm (' Test ');$PDBM->open (pdbm_creat |
To improve the security of the server, this lesson is mainly about how to modify the MySQL port under Linux. Support for most system changes in Linux environments, such as CentOS and Ubuntu.
Demo Environment:
Linux CentOS 6.3 X32Mysql 5.1.66
In other words, there is an article table article, the time to store the article is the Add_time field, which is type int (5), now needs to query the total number of articles added today and sorted by time from big to small, the query statement is
MySQL modified password method Encyclopedia:
The code is as follows
Copy Code
mysql> Update user Set Password=password (' NewPassword ') where user= ' root '; mysql> flush Privileges; Mysqladmin-u root-p PASSWORD
Grammar
The code is as follows
Copy Code
Case value when [compare-value] THEN result [when [compare-value] THEN result ...] [ELSE result] When [condition] THEN result [when [condition] THEN result ...] [ELSE result] End
The typical page-level representative engine is BDB.The typical representative engine for the table level is myisam,memory and ISAM, a long time ago.The typical line-level representative engine is InnoDB.
Many operations are read tables.Read and
MySQL Tutorial triggers database tutorial Synchronizing data methods
Database nameDriver table The table being triggered/***-------------------Documentation Comments------------------------------------------* The author * tatsu *qq 85089479*email
MySQL tutorial cursor cursor definition
DECLARE cursor_name cursor for select_statement;
Cursor operations
Open cursor
OPEN cursor_name;
Fetch gets the record of the cursor's current pointer and passes it to the specified list of variables,
Change MySQL database storage path and port in Linux
Suppose we change to the/opt/data directory to pour:
1, opt directory to establish the data directory
Mkdir/opt/data
2, stop the MySQL service process
Mysqladmin-u root-p shutdown
3.
Yum install MySQL
First, install MySQL.Yum List | grep MySQL; Select the appropriate version, Yum intall the version;Yum List | grep mysql-server; Select the appropriate version, Yum intall the version.After the installation is complete, add the
The following error occurred while compiling percona-toolkit-2.2.9:Checking If your kit is complete ...Looks GoodWarning:prerequisite Dbd::mysql 3 not found.Writing Makefile for Percona-toolkitAccording to the recommendation, the MySQL module used
Install and uninstall the mysql service Install mysql serviceCreate and edit a bat file with the following content, run it (e: mysqlinmysqld-nt.exe is the installation directory, fill in according to the actual situation)@ ECHO OFFE:
Max queries per hour --- maximum number of QUERIES PER HOURMax updates per hour --- maximum number of UPDATES PER HOURMax connections per hour --- maximum number of CONNECTIONS PER HOURIn Win, you can modify my. ini:4.0 and later versions are
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