CentOS install MySQL 8. X

MySQL installation (4, 5, 6 can be omitted) Declaration: CentOS version is 7.6, MySQL version installed is 8.0.17 1. First, uninstall mysql, including MariaDB. rpm -pa | grep mysql #Use 'rm -rf file name' to delete the found results, and skip if not rpm -pa | grep mariadb #Use 'rm -rf file name' to delete the found results, and skip if not fi ...

Posted by seavers on Mon, 21 Oct 2019 20:41:33 -0700

Centos7 forgot the root password of mysql

1. Stop mysql service first ​[root@CentOS ~]# ps -ef | grep mysql root 5365 1 0 15:47 pts/0 00:00:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/usr/local/mysql/data --pid-file=/usr/local/mysql/data/CentOS.pid mysql 5452 5365 4 15:47 pts/0 00:00:00 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --d ...

Posted by designationlocutus on Mon, 21 Oct 2019 08:56:31 -0700

Python learning journal Mysql database Chapter 9

Preface The main function of index is to restrict and speed up the search. The ORM framework (sqlalchemy) uses classes and objects to operate the database.   Types of indexes By category 1. General index: can speed up search 2. Primary key index: can speed up search, cannot be empty, cannot be duplicate 3. Unique index: accelerated searc ...

Posted by leightons on Mon, 21 Oct 2019 07:00:00 -0700

Pat B 1050 spiral matrix

Title Description: This question requires that the given n positive integers be filled in "spiral matrix" in non increasing order. The so-called "spiral matrix" refers to the first lattice in the upper left corner, which is filled in a clockwise spiral direction. It is required that the scale of matrix is m rows and N col ...

Posted by BLaZuRE on Sun, 20 Oct 2019 13:34:47 -0700

Centos-7.4lamp architecture Discuz Forum

Linux-centos-7 lamp Architecture Forum page details Experiment purpose: to set up a forum web page on LAMP framework I. overview of LAMP architecture Three components are needed: Linux, Apache and mysql. Their source packages are private to me and I will send them to you. You don't need to go to the official documents again. 1. Understand th ...

Posted by wake2010 on Sun, 20 Oct 2019 11:50:29 -0700

python uses database to realize user management.

After learning database, we can use database to make a user management system. Realize the functions of registration, login, view, delete users, etc.Step 1: specifically divided into two parts, the first part is to connect the database, and create a table to encapsulate the table into a class. The speci ...

Posted by Random on Sun, 20 Oct 2019 11:46:02 -0700

mybatis inserts mysql in batches, and updates if it exists

In some scenarios, a set of data needs to be inserted into the database and updated if it already exists. If the database is mysql, we can use the on duplicate key update statement instead of dealing with insert and update separately.   I've read many posts before. Table structure and entity class ...

Posted by Felex on Sun, 20 Oct 2019 08:26:29 -0700

Various database command line tools: mycoli litecli MSSQL cli pgcli

If you normally operate the database on the command line, it is highly recommended that you use the following command-line tools. mycli Mycli is a MySQL based command-line tool, which is directly installed by pip install mycli. For details, see https://github.com/dbcli/mycli $ mycli --help Usage: mycli [OPTIONS] [DATABASE] A MySQL terminal c ...

Posted by timmybuck on Sat, 19 Oct 2019 11:28:17 -0700

Using HIkariCP in spring MVC project

What is HIkariCP https://www.jianshu.com/p/15b... Using HikariCP data sources pom.xml <dependency> <groupId>com.zaxxer</groupId> <artifactId>HikariCP</artifactId> <version>3.3.1</version> </dependency> Spring-mvc.xml <bean id="dataSource" class="com.zaxxer.hikari.HikariDataSource" destroy ...

Posted by tomas.srna on Thu, 17 Oct 2019 12:08:19 -0700

Dynamic configuration of data source based on spring boot and AOP

Spring boot + AOP mode for multi data source switching Overall design idea: spring boot + AOP mode realizes multi data source switching, inherits AbstractRoutingDataSource to achieve dynamic data source acquisition, and uses annotation to specify data source in service layer. I. multi data source configuration In application.properties, our ...

Posted by the_Igel on Wed, 16 Oct 2019 23:06:57 -0700