Connecting to a database$link = mysql_connect (' localhost ', ' root ', ') ' or Die (mysql_error ());mysql_select_db (' class ', $link) or Die (Mysql_error ());mysql_query ("Set names GBK");Infinite Classification Class Library
The code
Free 2gb PHP tutorial mysql tutorial no advertising bindable domain space application
justfree.com Free 2g/2g/php/mysql/ftp/subdomain/domain/no ads space
justfree.com free 2g capacity web space, limited 2g traffic per month, support PHP, free
Three free PHP tutorials for MySQL Tutorials ASP Tutorials Universal Space Application addressfree.bg free 10m capacity of pure static web space, maximum limit of 1500 files, a single file maximum limit of 700k, support Web and FTP upload management
Product Type Super host 300M (asp-300 type) Web space 300M Database space complimentary MySQL database 20M (independent of web space) Access database free (share database size with web space) Bundle Professional Post Office √
Super Host 100M (asp-100 type) Web space 100M Database space complimentary MySQL database 20M (independent of web space) Access database free (share database size with web space) Bundle Professional Post Office √ Specification limit
SELECT query Statements and conditional statementsInsert Insertion StatementUpdate UPDATES statement (Modify statement)Delete Deletion statement
Writing standard: All SQL operation statements are written in uppercase letters, others are lowercase.
The limit for total index length is:
The InnoDB internal maximum key length is 3500 bytes, but MySQL itself restricts this to 3072. (1024 bytes for non-64-bit builds before MySQL 5.0.17, and for all builds before 5.0.15.)
In the UTF8 character set,
Recently encountered some egg pain, all the business processing to the MySQL function to deal with, resulting in the MySQL CPU usage is a tiger. SQL speech is also a language, including some processing functions for connection strings, such as
Today to help friends to maintain the server, in the shutdown Database command found MySQL closed, prompted warning:world-writable config file '/etc/my.cnf ' is ignored, probably means that the permissions of the global writable, any user can write.
1. Brief description of the restoration principleBecause of the more detailed description in the document, here is a simple description. All INNODB data is organized in an indexed manner, and all data is stored in a 16KB block of data. The recovery
The easiest way to do this is
MySQL Remote configuration
The code is as follows
Copy Code
GRANT all privileges on *.* to root@ '% ' identified by ' your Paaaword '; % indicates that there are more machines.
Supports more than 100 adjustable settings; Fortunately, mastering a few can satisfy most of the needs. Finding the correct values for these settings allows you to view the status variables by using the show status command to determine whether the
MySQL tutorials do not use the rand () function to implement random read database Tutorial records method, as well as Google the relevant files, and found that everyone almost exclusively use ORDER by RAND () to achieve this, but in fact there are
MySQL Tutorial Import Excel method
The simplest way is to use the PHP tutorial myadmin directly import xls file on it, this is not much said below to see about PHP with the command of MySQL and shell combination of two methods.
Method One:
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
Method Reference from:Http://stackoverflow.com/questions/8422455/performing-a-like-comparison-on-an-int-fieldThat is, you use the cast transformation to specify the fields and then compare them. The specific sample code is as follows:SELECT from
Error: 1130-host allowed to connect to this MYSQL serverWorkaround:1. Change the table method.It may be that your account is not allowed to log on remotely, only on localhost. This time, as long as the computer on the localhost, log in to MySQL,
Common mysql commands and basic mysql commands
Mysql database usage Summary
This article mainly records some mysql commands for future query.
1. Change the root password
Mysqladmin-uroot password 'yourpassword'
2. remotely log on to the mysql server
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