When you need to use PHP to connect to the MySQL database, there are two types of database connection functions: mysql_connect () and Mysql_pconnect (). 1, mysql_connect () At the beginning of the script, mysql_connect () creates a new connection
Free 1GB no advertising free space application (PHP tutorials mysql tutorial)
Free 500m/1g/html/ftp/subdomain/no ads Space
Szm.com is a Slovak website, free 500m capacity page space, monthly limit 1g traffic, a single file maximum limit 500k, pure
1. Table Damage Reason analysis
The following are common causes of MySQL table corruption:1, the sudden loss of power to the server caused data file corruption.2, forced shutdown, did not first shut down the MySQL service.3. The mysqld process was
Store time stamp to MySQL database, use conversion function Unix_timestamp.
Pgsql
The code is as follows
Copy Code
INSERT into Tbl_name (col1) VALUES (Unix_timestamp (' 2012-11-13 13:54:22 '));1 INSERT into Tbl_name
A Linux server scheduled backup
The first step is to create a new *.sh file.
New in Home directory
autobackupmysql.sh
#!/bin/sh# File:/home/mysql/backup.sh# Database InfoDb_name= "Test"Db_user= "Root"db_pass= "Root"# others VARsBin_dir=
Basedir = Path
Use the given directory as the root directory (installation directory).
Character-sets-dir = Path
Gives the directory where the character set is stored.
DataDir = Path
Reads the database file from
A bit Download MySQLVisit MySQL's official website http://www.mysql.com/downloads/then you will see a "download" click under "MySQL Community Server" on the page.Go to MySQL Download interface (http://www.mysql.com/downloads/mysql/), if you are
Install Php7+apache2.4+mysql under Windows because of learning needs1. Installing ApacheDownload Apache2.4 to official website, select the Windows version, here I download version 2.4Unzip after downloadModify Conf/httpd.confThe path here is the
Method One: Authorization law:Run on the machine where MySQL is installed:1, d:/mysql/bin/>mysql-h localhost-u root//This should allow access to the MySQL server2, Mysql>grant all privileges on * * to ' root ' @ '% ' with GRANT OPTION; Give any host
Environment:linux,mysql5.5.21Error: Host is blocked because of many connection errors; Unblock with ' mysqladmin flush-hosts 'Reason:Congestion caused by the same IP in a short period of time resulting in too many (exceeding the maximum value of
It takes a long time and effort to analyze a single table when encountering a database that does not have a description of the document.Fortunately there are some tools that can help us to generate ER diagrams, so it looks at a glance;Below, I will
Bug review:Presumably everyone will encounter a connection timeout problem when using MySQL, as shown in:# # # Cause:com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:The last packet successfully received from the Server was 47,795,922
The slow query log of the MySQL database is an important tuning auxiliary log, but the log format of the MySQL default record is not friendly enough to read, which is determined by the MySQL logging rule, capturing one record, although the recorded
Detailed Description: MySQL uses Event Scheduler to create a scheduled task, mysqlscheduler
Preface
The event scheduler is equivalent to scheduled tasks in the operating system (for example, scheduled tasks in cron and Window in Linux), but the
Modify MySQL Default character set encoding and mysql character set encoding
It's better to remember it than to write it down. A lot of things were not written down at the time, so I forgot it. The next time I use it, I have to waste a lot of time
MySQL, MariaDB: Undo | Redo [convert], mariadbredo
This article describes how to roam the redo logs of the InnoDB Storage engine of MySQL databases.
00-Undo LogThe Undo Log is used to implement the atomicity of transactions. In the InnoDB Storage
MySQL Master-Slave replication (Master-slave) practice, mysqlmaster-Slave
The master-slave replication function provided by the MySQL database can easily implement multiple automatic data backups and expand the database. Multiple data backups not
MySQL parallel replication is already a commonplace. I started to deal with this issue online since 2010. I have been happy to share it for the first two or three years. Now I will mention this topic to avoid the suspicion of "stir-fried
Generally, it is not recommended to upgrade the database version. This script is dedicated to version control. To prevent compatibility issues between major versions, scripts by default only support upgrades between the same major version, such as
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