I. MySQL IntroductionMySQL is a small and flexible database server software that is ideal for medium and small application systems. In addition to standard ansi SQL statements, MySQL also supports multiple platforms. On Unix/Linux systems, MySQL
Start: net start mySql;Enter: mysql-u root-p/mysql-h localhost-u root-p databaseName;List databases: show databases;Select Database: use databaseName;List tables: show tables;Show columns from tableName;Create a database: source
By default, Mysql cannot be accessed through a remote machine. You can enable remote access through the following configuration.
My Mysql environment is ubuntu + mysql5
1. Modify/etc/mysql/my. conf, bind-address, and specify as the actual IP
If there are hundreds of tables in the company to trigger, if you manually write code. Very tired, so today I wrote a small program to automatically generate the mysql trigger code.$ Dbname = test; // Database$ Tab1 = user; // executed table$ Tab2 =
Solution 1:
Log on to the MySQL Server using the MySQL Adminstrator GUI Tool. The Server returns the following 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.
Before MySQL5.1, general log cannot be enabled or disabled at run time. Sometimes it is very troublesome to capture SQL to find the problem. By chance, I found a good tool: mysqlsniffer, which can be used to capture SQL statements, the help is as
Today, we will introduce six useful MySQL SQL statements. Many may use PHP to implement these functions.
1. Calculate the number of years
You figured out how old this person is on your birthday.
SELECT DATE_FORMAT (FROM_DAYS (TO_DAYS (now ()-TO_DAYS
For Windows Hosts
====================
Hypothetical environment:
MySQL installation path: C: MySQL
Forum Database Name: bbs
MySQL root Password 123456
Database Backup destination: D: db_backup
Program code
@ Echo off
C: MySQLinmysqladmin-u root --
This article compares datetime and timestamp in MySQL through examples. Although the two methods actually represent the same type, there are still some differences.
Same
Display
The display format of the TIMESTAMP column is the same as that of the
Today, we will introduce six useful MySQL SQL statements. Many may use PHP to implement these functions.
1. Calculate the number of yearsYou figured out how old this person is on your birthday.
SELECT DATE_FORMAT (FROM_DAYS (TO_DAYS (now ()-TO_DAYS (
Mysql> grant permission 1, permission 2 ,... Permission n on database name. Table name to user name @ user address identified by 'Connection password ';Permission 1, permission 2 ,... Permission n indicates 14 permissions, including select, insert,
SELECT statement DefinitionA complete SELECT statement contains several optional clauses. The SELECT statement is defined as follows: [] [] [] [] [] []The SELECT clause is required. Other clauses, such as the WHERE clause and group by clause, are
0. First, prepare two machines A and B and install the same version of mysql on them (preferably 5.0 or above)A is the master database, and B is the slave database.1. mysql synchronization server-id format description A B CA: 1: Indicates domain
Sometimes you forget the password of the root account in mysql, or the password is empty, resulting in no access to mysql or extremely low security. In this case, you need to update the password of the root account. There are many ways to change
-- View the character set of the database
Show variables like 'character \ _ set \ _ % ';
Show variables like 'collation _ % ';
-- Set database character encoding
Set names 'gbk'
Alter database payment character set GBK;
Create database
Parameters
Mysql stored procedure parameters are used IN the definition of stored procedures. There are three parameter types: IN, OUT, And INOUT.
Create procedure | function ([[IN | OUT | INOUT] Parameter Name Data Class…])
IN input
Does MySQL 5.1 storage programs and functions work for replication?Yes, the standard behavior executed in the storage program and function is copied from the master MySQL server to the slave server. There are a few limitations, which are detailed in
Because the server space is tight, you need to move mysql datadir under Ubuntu 10.04 from the default/var/lib/mysql to/usr/local/mysql. The operation is as follows:1. Changed/etc/mysql/my. cnf to datadir =/usr/local/mysql.2.
Recently, the project encountered performance problems when using the mysql database. When a single table has more than million data, the speed of adding, deleting, modifying, and querying is significantly reduced.We are a call center, and we need
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