Create, authorize and delete users with mysql

1.mysql creates a read-only account Create users through GRANT (create users and authorize them at the same time): GRANT SElECT ON *.* TO 'reader'@'172.16.%.%' IDENTIFIED BY "reader123" *. * all libraries. If only one library is authorized, such as test, it is written as test* reader is the user name 172.16%.% is the ip ...

Posted by IceDragon on Tue, 07 Jan 2020 11:19:05 +0100

Using macros in the source code of Apollo xlua

This article explains how to use macros in two modes. First, there are two modes under Apollo Lua, one is web mode and the other is tool mode. In the web mode, we can use it on the browser side, but there are some limitations. For example, some native APIs cannot be used, such as ngx, redis and mysql. For example, please see web console exampl ...

Posted by FlipinMonkeyPie on Tue, 07 Jan 2020 07:45:08 +0100

CentOS7 Install and Configure MySQL 5.7

Download MySQL installation [root@localhost ~]# cd /home/data/ [root@localhost data]# ls get-docker.sh nginx-1.10.1 nginx-1.10.1.tar.gz redis-5.0.3 redis-5.0.3.tar.gz server-jre-8u131-linux-x64.tar.gz zookeeper-3.4.10.tar.gz [root@localhost data]# wget https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm If prompted ...

Posted by neox_blueline on Sat, 04 Jan 2020 22:13:11 +0100

MySQL open remote access complete solution

Applicable environment MySQL 5.7 Ubuntu 16.04 (applicable but not limited to the above environment) 1, Enable MySQL remote access Changing the value of mysql.host field to% means that you can log in to MySQL server on any client machine mysql> use mysql; Database changed mysql> grant all privileges on *.* ...

Posted by Roger Ramjet on Sat, 04 Jan 2020 14:39:08 +0100

MYSQL composite partition

Composite partition is the partition of each partition in the partition table. The sub partition can use either HASH partition or KEY partition. This is also known as a subarea. Tip: mysql can only use HASH/KEY partition for sub partition, which is also different from ORACLE. The following issues need to be noted for composit ...

Posted by chasiv on Sat, 04 Jan 2020 02:53:26 +0100

Scala notes (5): MySQL database configuration and scala programming

MySQL database installation configuration In order to see / operate the database easily and intuitively, Navicat Premium software is generally installed to support multiple databases. There is not much nonsense in the installation process, mainly referring to the following connections, no pit in hand test, which are the main ...

Posted by aleph_x on Sat, 04 Jan 2020 02:29:12 +0100

MySQL paging query optimization case

On December 25, when viewing the monitoring of a customer, it was found that the customer had executed page by page queries for more than 60s. The execution status is as follows: This is a very simple and typical page query SQL. khome_space.regdate column has an index, and the table has more than three million rows of data. The offset of the q ...

Posted by paulsiew2 on Sat, 04 Jan 2020 00:08:17 +0100

Database: sql recursive query

  mysql self association table, the following are examples of downward recursion and upward recursion. 1. Prepare for recursive query. If your table already exists, this step can be ignored. Building tables CREATE TABLE `wq_areainfo` ( `id` int(11) NOT null AUTO_INCREMENT, `level` int(11) DEFAULT 0 , `name` varchar(255) ...

Posted by Gummie on Fri, 03 Jan 2020 21:43:06 +0100

Database - 03 MySQL human resource management system

MySQL human resource management system 1. Design background This exercise is mainly designed for human resource management system, including three tables: department table and employee table. Department table is mainly used to store department name, address and other information Employee table is mainly used to store emp ...

Posted by venom999 on Fri, 03 Jan 2020 18:22:50 +0100

MySQL [2] single table query (exercise 1)

Log in, view and use Mysql-uroot-p password SHOW DATABASES; -- view all databases USE DB1; -- use one of the databases Departmental table CREATE TABLE DEPT( DEPTNO INT PRIMARY KEY, DNAME VARCHAR(14), -- Department name LOC VARCHAR(13)-- Department address ) ; INSERT INTO DEPT VALUES (10,'ACCOUNTING','NEW YOR ...

Posted by StormS on Fri, 03 Jan 2020 07:02:30 +0100