First, stop the MySQL service. Start -- run -- services. msc -- find MySQL service and stop
Default installation location of MySQL:
C: \ Program Files \ mysql \ MySQL Server 5.0
Then, modify the my. ini file. Go to the MySQL installation
Write it down first, so that you won't be able to remember it again!
When using PHP to operate the database, the data in the database is UTF-8 encoded. when reading the data, all the information displayed is ??????? Question mark garbled, Found
1. Change Table Method
It may be that your account is not allowed to log on remotely, but only on localhost. At this time, you only need to log on to the computer of localhost and change the "host" entry in the "user" table in the "MySQL" database
When a query statement is used, the first few or a few rows of data are often returned. What should I do at this time? Don't worry,MySQLThis feature has been provided for us.
Select * from Table limit [offset,] rows | rows offset
The limit clause
Step 1 @ open CMD and run the command net stop MySQL to stop the MySQL Service
Step 2 @ go to the bin folder of the MySQL installation directory and run mysqld-NT -- skip-grant-tables
(The purpose is to skip password detection) do not close the
The so-called lock is a rule that ensures data consistency and orderly accesses to shared resources concurrently.
Different MySQL storage engines have different lock mechanisms or lock implementations. In general, three lock levels are used:
1. Data Import
Error: 1265, data truncated for column 'column name' at Row 1
Show variables like 'SQL _ Mode'
Strict_trans_tables, no_auto_create_user, no_engine_substitution
Solution:
Set @ Global. SQL _mode = 'no _ auto_create_user, no_engine_
Original http://www.cnblogs.com/daimage/archive/2012/02/25/2367534.html
1. MySQL workbench
MySQL workbench is the database administrator,ProgramDevelopers and system planners provide visual SQL development, database modeling, and database
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->Read MySQL
This. TMr. Enabled = false;If (Conn! = NULL)Conn. Close ();
String connstr = string. Format ("Server = {0}; user id = {1}; Password = {2
Use show tables to check whether these tables are there?
Generally, as long as the XX. frm file is in the job directory, you must have the table name in show tables.
But only the table name. The data file is in another file. For InnoDB, data
1. display the database
show databases;
2. Select a database
Use Database Name;
3. display tables in the database
show tables;
4. display the data table structure
Describe table name;
5. display table records
Select * from Table Name
6. Create
In some cases, if only one query result is known, using limit 1 in SQL statements will increase the query efficiency.
For example, the following User table (primary key ID, email address, and password ):
create table t_user(id int primary key
You can create and delete indexes in two ways. One is alter table and the other is create/drop index. alter table index creation Syntax: alter table tbl_name | add {index | key} {index_name} {index_type} (index_col_name ,......) [index_option] ......
Applicable scenarios of Pt-stalk: ① MySQL server performance fluctuations FrequencyVery low, for example, once a few days ② MySQL server performance fluctuations ProbabilitySoon, for example, flash in a few seconds (I) Installation ① Download
Call mysqldump, a MySql tool.
Class Cmd to call the cmd command,The Directory of the process to be started is the directory of mysql's automatic backup and restoration database tool mysqldump and mysql. Of course, this method can execute other
I have been studying PHP for just a few months. In the past, I would like to summarize some of the basic installation and configuration I have learned as follows:
1. download the relevant installation package:
1. Download apache installation
1. The simplest modification method is to modify the character set key value in mysql's my. ini file,
For example, default-character-set = utf8
Character_set_server = utf8
After modification, restart the mysql service, service mysql restart
Use
Java Chapter 2
Today, I mainly talked about thread synchronous communication and Timer: Timer and TimerTask, and some examples are given.To avoid deadlocks, let the thread release its locked resources as much as possible when it enters the blocking
MySQL Java chapter 14th
Today, I am mainly talking about the mysql database. Most of the explanations are about the learned knowledge, which is summarized as follows:
I. Show database. // display the data in the current database
Create database //
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