Getting started with JDBC
JDBC concepts and quick start cases
1. Concept of JDBC:
Operate database by Java code (add, delete, modify, check)
2. Quick start procedure:
A.Import jar package
B.Registration driven
Class.forName("com.mysql.jdbc.Driver");
C.Acquisition drive
String url = "jdbc:mysql://127.0.0.1:3306 / EE "; / / EE is the name ...
Posted by javawizkid on Wed, 01 Jan 2020 00:58:11 -0800
PHP realizes the effect of similar question bank
PHP realizes the effect of similar question bank
Hello everyone, I think someone is back. I learned a little bit about PHP recently, and then I want to write a simple example to try. So I wrote something similar to extracting questions from the question bank, which is to input the number of questions to be extracted first, and then randomly ext ...
Posted by doox00 on Tue, 31 Dec 2019 17:05:26 -0800
saltstack -- online environment (1)
Install mysql on 11
yum install mariadb mariadb-server -y
Add in mysql configuration file my.cnf
init_connect='SET collation_connection = utf8_unicode_ci'
init_connect='SET NAMES utf8'
character-set-server=utf8
collation-server=utf8_unicode_ci
skip-character-set-client-handshake
Start mysql after configuration
Set the password befor ...
Posted by crusty_php on Tue, 31 Dec 2019 15:45:00 -0800
Introduction to MariaDB database (including backup and recovery)
1. Install the main program and server of MariaDB database
[root@fudanwuxi ~]# yum install mariadb mariadb-server.x86_64
[root@fudanwuxi ~]# systemctl restart mariadb.service
[root@fudanwuxi ~]# systemctl enable mariadb.service
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/ ...
Posted by pereira2k5 on Tue, 31 Dec 2019 14:39:52 -0800
27.0 implementation of vsftpd virtual user based on MYSQL authentication
Implementation of vsftpd virtual user based on MYSQL authentication
1. Install packages and package groups
2. FTP server realizes PAM configuration
3. Prepare ftp related tables in the database
4. Modify vsftpd configuration file and call PAM ﹣ MSYQL module
5. Virtual users mapping to system users
6. Implement different ...
Posted by bastien on Tue, 31 Dec 2019 07:43:39 -0800
C ා connect to mysql database by reading configuration file
The most common way to connect to the database is through string connection, as follows:
public static string connstr = "server = localhost; uid = root; pwd = 123456; database = db_sms;";
MySqlConnection conn = new MySqlConnection(connstr);
MySqlCommand comm = new MySqlCommand(sqlstr, conn);
However, this method is not con ...
Posted by Redlightpacket on Tue, 31 Dec 2019 07:40:54 -0800
Linux basic learning - Docker learning notes
Docker installation
1 Official website The access speed is very slow, Help document
2 domestic Chinese website,Help document
[root@qdlinux ~]# yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotat ...
Posted by mzfp2 on Tue, 31 Dec 2019 06:51:52 -0800
Java learning daily (using JDBC)
Learning content
Use of JDBC
Development steps
1. Select database: load database driver;
2. Connect to the database
3. Create database query
4. Get query results
5. Get query results
Complete JDBC operation code
package com.dodoke.jdbc;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Prepared ...
Posted by cdjsjoe on Tue, 31 Dec 2019 05:34:00 -0800
Using Python 3 to save csv format to MySql database
Next, you need to store the stock data in csv format in mysql database:
Here are two methods:
+Using pymysql
+Using sqlalchemy
See mysql installation here: https://blog.csdn.net/tonydz0523/article/details/82501177
Using pymysql
Install pip install pymysql
You also need to use pandas PIP install pandas
First, establish a ...
Posted by bitt3n on Tue, 31 Dec 2019 03:31:19 -0800
Mysql -- stored procedure
A stored Procedure is a set of SQL statements that are compiled and stored in a database to complete a specific function. The user can execute it by specifying the name of the stored Procedure and giving parameters.
Stored procedures can contain logical control statements and data manipulation statements, which can accept para ...
Posted by storyteller on Tue, 31 Dec 2019 03:05:39 -0800