After work, use your spare time to summarize how to use the Java language for MySQL database backup:[Java]View PlainCopy
Import Java.io.BufferedReader;
Import Java.io.File;
Import Java.io.FileOutputStream;
Import java.io.IOException;
MySQL by default to turn off Telnet permissions, the following actions allow users to log in any location: 1. Enter mysql,grant all privileges on * * to ' root ' @ '% ' of ' identified by ' with the GRANT option;identified by followed by a password
After the MySQL installation is complete, modify the location of the database storage, such as from the C:\Program files\mysql\mysql Server 5.0\data folder in the installation directory to the D:\mySQLData folder.1. Create a new Mysqldata folder
This evening after the Mac update reinstall after the installation of MySQL, the service will not log on to the prompt 1045 error. Follow the online data to reset the MySQL password. The following steps are documented:1. First turn off the MySQL
I would like to say that in the "Code Audit: Enterprise Web Code Security Architecture" in the book 10 kinds of MySQL error injection, it is very clear.Interested please go to read, if for some reason did not read still want to understand, then
MySQL Add, delete, check, change Registration, Authorization#创建一个对数据库中的表有一些操作权限的用户, where operation can be replaced with all privileges, DBNAME, TableName can be replaced with *, which means all mysql> grant operation on DBNAME. TABLENAME to '
After building the fabric, you can create HA group, Shard Group, Ha+shard group, etc. on its basis. Here's how to quickly build an HA environment.
Fabric
192.168.2.234:33060
Master
192.168.2.234:33061
1. Display Databaseshow databases;2. Select DatabaseUse database name;3. Display the tables in the databaseShow tables;4, display the structure of the data tabledescribe table name;5. Display the records in the tableSELECT * FROM table name6. Build
Select the connected database in Navicat for MySQL, select "Connection Properties" in the right-click menu, the settings save path in Advanced is Navicat for MySQL save path, the backup is also inside. 650) this.width=650; "Src=" Http://s3.51cto.com/
MySQL is stored on disk, and all kinds of natural disasters can result in data loss. Large companies when we often need to do a good job of data hot and cold, for small companies to do all the data backup needs to spend a lot of costs, many
1. The test process is as follows:CREATE TABLE' Test ' (' ID ')int( One) not NULLauto_increment, ' name 'varchar( -)DEFAULT NULL, PRIMARY KEY(' id '),UNIQUE KEY' name ' (' name ')) ENGINE=InnoDBDEFAULTCHARSET=utf8Transaction 1:
Before the installation how is more or less a problem, this successful installation, recorded.1. Download the MySQL version for your computer;2. Set Environment variables:Adding the MySQL Bin directory to the system variable path, WIN10 's path path
At the beginning of the work, in the work of the database-related issues, mostly with the coding, summarize the database encoding settings.Character set view the character set supported by the database:SET;You can see the character sets available in
I. Creating a MySQL stored procedure1,CREATE PROCEDURE ' Insertalarminfo ' (in Businessindex int, in Providerindex int., in Alarmtype int, in Alarmlevel Int,in detecttime DateTime, in alarmdescription varchar (+), in Alarmphenomenon int, in
Install the compressed version of the *.tar.gz version of MySQL1. Add MySQL group and MySQL user to set the MySQL installation directory file owner and owning group.[[email protected] Java EE] #groupadd MySQL[[email protected] Java EE] #useradd-r-G
mysql query process:
The client sends a query request.
The server checks the query cache and returns the result if the cache is hit, otherwise, proceeds.
The server performs SQL parsing, preprocessing, and then the optimizer
First, change the my.cnf configuration file1. Edit the/etc/my.cnf configuration file with the command, namely: VIM/ETC/MY.CNF or VI/ETC/MY.CNF2. Add skip-grant-tables under [mysqld] , then save and exit 3. Restart MySQL services: Servicemysqld
Skills and optimization of SQL statements learned by mysql, and skills of mysqlsql statementsI. use regular expressions in SQL
Select name, email from user where email Regexp "@ 163 [.,] com $ ";
The use of Regexp in SQL statements has a great
Navicat for MySQL: a simple method for exporting table structure scripts. navicatmysql
Use the MySQL visualization tool Navicat to export the MySQL table structure script.
1. Right-click Database> Data transmission in Navicat ).
2. Select the
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