Linux environment MySQL new user and database and authorize

1. Log in to MySQL#mysql-U root-p2. New usersInsert into Mysql.user (Host,user,password) VALUES ("localhost", "xxx", Password ("* * *"));Note: XXX is a new user name, * * * user password3. After executing the sentence, you also need to refresh the

Binary installation MySQL Database

Today installed is the binary MySQL package 5.7.21 package, in the configuration file when a lot of pits, left or done, to share with youBinary msyql5.7.21 version master-slave copy installationNew/picclife DirectoryMkdir/picclifeNew/picclife/data

MySQL database Advanced (eight)--Events

MySQL database Advanced (eight)--event One, Introduction to Events 1, Introduction to EventsAn event is a set of SQL sets that are used to perform timed tasks that are triggered when time is up.An event can be invoked once or periodically, and

MySQL Three-aspect optimization

First: 30 Ways to optimize SQL statement queries by MySQL1. To optimize the query, avoid full-table scanning as far as possible, and first consider establishing an index on the columns involved in the Where and order by.2. Try to avoid using the! =

Use of MySQL Cursors

This is an example of how a cursor is used.But there are a few points to note, which is why to join declare CONTINUE HANDLER for SQLSTATE ' 02000 ' SET tmpname = null;If not added, will be directly error. No Data-zero rows fetched, selected, or

MySQL Database index

1. What is the index of the structure used by MySQL?1). The MyISAM engine uses B+tree as the index structure, and the data domain of the leaf node holds the address of the record. Therefore, the algorithm of index retrieval in MyISAM is to search

MySQL database Advanced (ix)--Cursors

MySQL database Advanced (ix)--cursor One, cursor INTRODUCTION 1, Cursor introductionThe design of a cursor is the idea of a data buffer that is used to hold the results of the SQL statement execution. A cursor is a mechanism that extracts one record

MySQL-based database practice (extended operation)

Wildcard characters in a selectAsterisks * can be used to select represent all the attributes in a clause.Mysql>SelectInstructor.* fromInstructor, teacheswhereInstructor.id = teaches.id;+-------+------------+------------+----------+|ID| name |

MySQL backup script

1. Backup Scripts#!/usr/bin/env python#_*_coding:utf-8_*_ "" "@File:  backup_db.py@author: oldtan@email: [ Email protected] @Last  modified: 20180408 "" "import osimport datetimefrom  threading import threadhost =  ' 10.36.1.101 ' user =  ' root '

Import data from MySQL to the Greenplum cluster

We want to export data from MySQL to Greenplum, follow these steps to1: Export tables from MySQL to external filesTaking Schema_name.table_name as an exampleSelectproduct_id, Number, name, English_name, Purchase_name, System_name, Bar_code, Category_

How to remove one of the elements in the MySQL field collection

In a one-to-many scenario, we use a comma concatenation to store, avoid storing multiple, or sub-table, then there is a storage on the need to modify if necessary, it brings difficulty, such as the Rule record table as followsIf the 2nd rule is

MySQL timed backup shell script

#!/bin/bash# every morning at 4, MySQL backs up data #chmod theBackup.SH#crontab-e#0 4* * * */home/erya/run/moniter/mysql_backup.SHUser="radius"Password=""Host="localhost"db_name="radius"#backup Directory

How to remove MySQL completely

MySQL uninstall is really a headache, many times can not be completely uninstalled, this will cause us to reinstall the new MySQL.The following describes, under the WINDOWS10 system, how to completely remove the uninstall MySQL ...1 "Stop MySQL

MySQL database Advanced (vi)--index

MySQL database Advanced (vi)--index One, introduction to the index 1, Introduction to the indexIndex is the data structure that helps MySQL to get data efficiently.In MySQL, indexes belong to the concept of storage engine level, and different

MYSQL Import Export Database file

To export a database or table file from a database:Mysqldump-u User name-p password-d database Name table name > script name;Export the entire database structure and dataMysqldump-h localhost-uroot-p123456 Database > E:\dump.sqlExport a single data

MySQL Chinese garbled--in MySQL in the Chinese into a question mark solution

Today, the server in the test, found in the database of Chinese all become question marks!First think of this is the coding problem: So again set the database encoding to UTF8However, the problem persists:It was later discovered that the root of the

How MySQL (mariadb) changes the root password

MySQL (or mariadb, she is a branch of MySQL, completely open source, the new version of the Linux system is installed by default mariadb) How to change the root password? We mainly introduce command mysqladmin to implement.MySQL (mariadb) How to

MySQL Character set proofreading

There are two common types ofUtf8_general_ci are in normal alphabetical order and are not case sensitive (e.g. a B c D)Utf8_bin in binary order (for example: A in front of a, B D a C)CI is case insensitive, that is, "casing is not sensitive", a and

MySQL Simple optimization

The company upgraded the server configuration, the memory crunch problem solved, and thus thought of several simple ways to optimize MySQL. First, two things are clear, our business scenario is a common high concurrency Web service, the query speed

MySQL Select field data type

MySQL supports a number of data types, and choosing the right data type is critical to getting high performance. There is a simple principle in choosing to help make better choices .The simple principle:A, usually the smallest is the bestThis can

Total Pages: 3233 1 .... 1319 1320 1321 1322 1323 .... 3233 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.