PHP can be run across platforms, which means you can develop on Windows and then run on the Unix/linux platform. How to easily and quickly install the use of PHP in Windows is what beginners aspire to, because some of us are still accustomed to
The PDO extension defines a lightweight, consistent interface for the PHP Access database, which provides a data access abstraction layer,This way, no matter what database you use, you can execute queries and fetch data through consistent functions.
One, install MySQL
If it is a Windows user, MySQL installation is very simple, download the installation files directly, double-click the installation file step-by-step operation can be.
Linux installation may be more simple, in addition to
Remote access
Mysql-h localhost-uroot-p
Modify password
Mysqladmin-uroot-proot Password Admin
If the original password is empty
Mysqladmin-uroot Password Admin
Display version number, status, process information, etc.
Mysqladmin Version
SQL statement
The code is as follows
Copy Code
SELECT * FROM _test a LEFT join _test B on a.id=b.id where a.level= ' and a.month= ' and b.level= ' 03 ' ;Select a.*,b.* from (SELECT * to _test where level= ' and month= ')
Truncate usage
TRUNCATE [TABLE] Tbl_name
I want to delete all the records in the Friends table, you can use the following statement:
TRUNCATE TABLE friends;
Delete Usage
DELETE [low_priority] [QUICK] [IGNORE] from Tbl_name[WHERE
Replace replacement
The Replace function in MySQL directly replaces a specific string in a field in the MySQL database, and it is no longer necessary to write the function to replace it, which is very convenient to use. MySQL replacement function
The MySQL master copy structure differs from the master-slave replication structure. In the primary replication structure, any changes to the data inventory on either of the two servers are synchronized to another server, so that the two servers are
The MySQL client is primarily used to pass SQL queries to the server and displays the results after execution. It can run on the same machine as the server, or on two machines on the network. When you connect to a MySQL server, your identity is
Introduced:
1. The database will only be connected if you perform select, UPDATE, delete, INSERT, etc.
2, the use of PDO pretreatment mode
3. Transaction processing
4, Error output
The code is as follows
Copy Code
4. User module Design
For the underlying database, call the MySQL C API function for database modification, internal save
A certain state variable (for example, user name, or leave it to the previous level?) ), on the previous layer,
1. MySQL database does not have the mechanism of incremental backup, when the amount of data is too large to backup is a big problem. Fortunately, the MySQL database provides a master-slave backup mechanism, which is to write all the data in the
Importing a database because the file is too large and the file format is not a standard SQL file cannot be imported using sourceCSDN data format is: User name # password # mailbox data is separated by #The import SQL statement is as follows:
Analysis reason one: MySQL's automatic backup function may cause the database to shut down the service before the backup, but when this starts the server does not respond,
Start-run-services.msc, open Windows service to find MySQL services and
When connecting to the database tutorial show can ' t connect to MySQL Server (10060), Basic can follow the following ideas for troubleshooting:
1. The network is impassability.
Check to be able to ping.
2. Firewall settings.
Whether the
The biggest limitation is here--insert data, so we can only start from the existing function of the program, in fact, many programs can submit comments, messages, posts, etc., on the program is how to insert variables into the database. In fact, the
In the work used to also more, in the load data large file, if the file too assembly lead to the problem of master-slave delay, it must be split into many small files, the use of this tool does not require manual cutting files.
This tool works only
Asp tutorial. net Tutorial and mysql tutorial database tutorial connection method and instance codeMySQL database is a low-cost MySQL SQL Server database, and canEasy-to-use network applications, including ASP. NET projects. Connect to MySQL from
Python for MysqlFirst, I am used to writing configuration information to the configuration file, so that the source code is not needed for modification, and then write a common function for calling.Create a new configuration file named conf. ini.
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