In the past two days, I tried to install MySQL and went to the official website to download the 5.1 Community Server. After installing the common method, I opened the configuration tool and found that it could not be started. Open the command line
There are many
(1) Find My. ini in the MySQL directoryOpen it, find the default-character-Set setting, and change it:Default-character-set = gb2312
If the version is 5.0 or later, you can set it in the configuration panel:For details, see:Http://
MySQL Default character encoding is Latin1, and Java corresponds to the ISO-8859-1. To correctly display our Chinese characters, you only need to change the character encoding method of MySQL from Latin1 to Chinese and change it to "GBK" or "gb2312 "
To connect to the server, a MySQL user name and password are usually required when MySQL is called. If the server is running on the Login Server
You also need to specify the host name on other machines. Contact the Administrator to find the
1. mysql_affected_rows () // return the number of rows that were modified, deleted, or inserted in the last update, delete, or insert query.
2. mysql_autocommit () // switch the autocommit mode, ON/OFF.
3. mysql_change_user () // change the user and
Usage of rollup and limit in MySQL and optimization of the WHERE clause
1. group using Rollup
For example, the following table lists the sales volume of each salesperson in a company in a month:
Create Table example
(
Sale_id int
Can't connect to local MySQL server through socket '/var/run/mysqld. Sock'. Let's talk about the solution: root @ zby :~ #/Etc/init. d/MySQL restart cannot be started. It may be the permission of/var/run/mysqld on the Internet. However, I installed
Ubuntu JDK + Tomcat + MySQL environment to build 1. Install Ubuntu-server-10.04.11.1
Write down the user name and password entered during installation.1.2 set IP
After the installation is complete, set the IP address and enter the terminal:Sudo
Create and delete Indexes
You can create an index in the create table statement, or use the create index or alter table statement to add an index to the table. You can use alter table or drop index statements to delete indexes.
(1) Use the alter
Description: There is a member table, there is a birthday field, the value is 'yyyy-MM-DD 'format, now to query the birthday of a member within a period of time, for example, from '06-03' to '07-08 ', all the Members who celebrate their birthdays in
In fact, I always think that databases are more difficult to understand than Ningbo's sister paper, but both of them have to face it ~The story will continue, and the post will be updated occasionally ~ Connect to MySQL on the remote host: mysql-h11
Author Tag: Tomcat MySQL
Tomcat 5.0.28 MySQL 5 connection pool establishment reference http://tomcat.apache.org/tomcat-5.0-doc/jndi-datasource-examples-howto.html
1. Download the MySQL JDBC driverHttp://mysql.mirror.vmmatrix.net/Downloads/Connector-
1. log on to the system as a system administrator.2. Stop MySQL services.3. Go to the Command window and enter the MySQL installation directory. For example, if my installation directory is C: MySQL, go to C: mysqlbin.4. Skip the permission check
1. Text (clob)
In MySQL, the maximum varchar value is 65535 bytes. If the value exceeds this range, set it to text.
Longtext can be up to 4 GB
Store text // define SQL statement string SQL = "insert into clob (File) value (?) ";
Preparedstatement PS
Author: AngelNature of the article: originalReleased on: 2004-12-06
Some time ago I wrote a study on exporting field content in MySQL injection-exporting webshell through injection (http://www.4ngel.net/article/37.htm), which is to query
Distributed MySQL Databases use a single master with multiple slave architectures. Through the replication of master and slave, the application server can query slave through the Load balancer. In this way, the query can be distributed across
Enable MySQL binary log in Windows
1. Enable binary log
Change my. ini
Find [mysqld] and enter the following command
# Enable binary logs
Server-id = 1
Log-bin = E:/mysqlbin/BINLOG. Log
Log-bin-Index = E:/mysqlbin/BINLOG. Index
Restart
Problem:
Railsinstaller does not contain the MySQL gem by default.
After installing and configuring the rails environment using railsinstaller, you will find that you cannot use the gem update -- system or other updates or install the remote gem
I wanted to use MySQL to practice the SQL System. I did not expect to encounter so many troubles in Windows 7 installation,
The trouble is really troublesome. The installation is good at ordinary times. All the way is next. This kind of ghost is
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