1. First in the C disk we create a TXT document renamed it "Mysql-init.txt", the contents of the document we enteredUpdate Mysql.user set Password=password (' newpasswd ') where user= ' root ';
Flush privileges; Note: One of the newpasswd can be
Using commands is a commonly used mysqldump to operate (mysqldump commands are located in the mysql/bin/directory)
The Mysqldump tool has a number of options, some of which are listed below:
Option/option action/action performed
--add-drop-table
Specific methods
Before deleting a log, check the log files currently used by the master-slave server.
First log on the MySQL terminal of the server to which you want to delete logs#mysql-U root-pxxxxx
Check Replication master server
CONCAT (STR1,STR2,...)
Returns a string resulting from a connection parameter. If any of the arguments are null, the return value is null.
For example:SELECT CONCAT (CAST (Int_col as CHAR), Char_col)
MySQL Query date and time:
The
Method 1----"MySQL is case-insensitive when querying strings, and when compiling MySQL, it usually takes the ISO-8859 character set as the default character set, so in the comparison processThis phenomenon is caused by the case conversion of Chinese
Error occurred while I was performing insert ABC (a) VALUES (' Bfdsafdsafdsafdsa ') : #1264-out of Range value adjusted for column ' A ' at row 1
Cause analysis
We see it in English because the length of the field is not enough
Solutions
Modify
First with the root account login phpMyAdmin, and then click on the left to enter the MySQL database, at the top of the click "MySQL" into the SQL input interface. Enter the following command:
The code is as follows
Copy Code
0. Environment
Ubuntu 12.04 x64 Server
MySQL 5.5.29
1. Steps
1.1 Modify your MySQL ' s "my.cnf" file, and add a line in "[Mysqld]" session:Skip-grant-tables
1.2 Restart MySQL
1.3 Log in MySQL without password$ bin/mysql-u Root-pPress ENTER
Import 1G of data, but in how not to import, with the command line can be easily done. Use the MySQL source command to import larger files.
The code is as follows
Copy Code
Mysql>use dbtest;Mysql>set names
Today from Windows to export a SQL execution file, and then poured into the unbutn, the results appear garbled, toss 7-8 minutes,Resolution methodWhen you export the MySQL SQL execution file, specify the encoding format:
The code is as
Filter all comments
Remove the space before the SQL text, tab, and so on. Note that the front and rear of the text. The middle will not be removed.
In the following three SQL, because of the Select Case relationship, the last one and the other two
In shell development, many times we need to manipulate the MySQL database (such as: query data, export data, etc.), but we can not access the MySQL command line environment, we need to simulate the environment of MySQL in the shell environment, the
PHPBB 2nd latest versionEasy to installFree technical supportUpload your own logoMultilingual interfaceSupports more than 50 languagesPrivate or public forumsFree subdomainsPowerful search toolsQuick reply to Defense DepartmentPrivate communication
Main features:Managed Account1 GB WEBSPACE10 GB bandwidth per monthPHP supports CGI, small industry, and Python24-hour FTP accessAccording to the government's cPanelNo pop-up advertisement Database functions:2nd database and 2 PostgreSQL
The garbled mysql problem is a headache, sometimes on the console, and sometimes on the service side.MySQL can refine the character set designation to a database, a table, and a column. Traditional programs do not use such complex configurations
What is an index?An index is a data structure used by the storage engine to quickly find records. An index is similar to a directory in a book. We can quickly find the content we are interested in based on the directory. Index is the Directory of
Install mysql from ubuntu today The code is as follows:Copy code Apt-get install mysql-server Found at startupService mysql startRather than invoking init scripts through/etc/init. d, use the service (8)Utility, e.g. service mysql start Since
First, go to the mysql installation directory.Backup:./mysqldump-u root-proot (do not have spaces) dbname>/home/aa. SQLRestore: mysql-u root-proot dbname Sorted out some instances1. Backup The code is as follows:Copy code [Root @ localhost ~] #
Recently, because the project needs to configure the mysql + php + apache environment, the steps are relatively simple and listed as follows:1. Installation Command: apt-get install apache2After changing the configuration, restart:/etc/init.
1: First install apache: open the terminal (ctrl + Alt + t ),Enter the following command: The code is as follows:Copy code Sudo apt-get install apache2 To install,After installation, open your browser and enter localhost or http: // 127.0.0.1
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