Connecting MySQL database with Linux (C + +)

1, Environmental installation The first is the installation of MySQL, which is directly installed only with apt get command (this method is recommended here, because it does not need to link the relevant path when compiling later programs) sudo apt-get install mysql-server After my installation, the relevant header files and dynamic lib ...

Posted by posidon on Fri, 20 May 2022 01:31:35 +0300

Use chroot to restrict SFTP users to the home directory

In this tutorial, we will discuss how to restrict SFTP users to their home directory or specific directory. This means that users can only access their respective home directories, not the entire file system. It is important to restrict users' home directories, especially in a shared server environment, so that unauthorized users will not pee ...

Posted by wih on Thu, 19 May 2022 14:27:23 +0300

LINUX core command combat summary I - shutdown, restart and logout commands

1. Shutdown, restart and logout commands 1.1. Shutdown, restart and logout commands [syntax format] shutdown [OPTION]... TIME [MESSAGE] shutdown [option]... time [news] Parameter description of Shutdown command Parameter options Explanation (focus on those with *) -r Restart the system instead of shutdown. T ...

Posted by AndyMoore on Wed, 18 May 2022 12:06:09 +0300

Software testing environment -- install MySQL on Linux (detailed), fine sorting

1, Foreword Several common ways to install software on Linux: Source code compilationDecompress the compressed package (generally tar.gz)Compiled installation package (RPM, DPKG, etc.)Online installation (YUM, APT, etc.) The convenience of the above methods increases in turn, but the versatility decreases in turn Delete the development ...

Posted by parkej60 on Wed, 18 May 2022 02:16:56 +0300

Realize the chat room based on Linux socket from 0 - realize the login and registration function of the chat room - 3

In the previous article, we have talked about how to build a multi-threaded server model, which can support multiple clients to connect to the server at the same time. In this article, we will realize multiple clients, how to register information with the server and realize the function of login. data structure Then, the example code of the pre ...

Posted by mharju on Tue, 17 May 2022 20:25:37 +0300

About CentOS 7, divide part of the home directory into the root directory

1, Basic concepts Cent0S 7 enables LVM2 (Logical Volume Manager) by default, and divides a hard disk of the machine into two areas sda1 and sda2, in which sda1 is mounted as a system disk / boot with a small amount of space; Sda2 acts as a physical volume and completely as a Logical Volume group VG(Volume Group) centos. In this Logica ...

Posted by bharanikumarphp on Tue, 17 May 2022 14:45:00 +0300

How to get Docker images to take off, so simple to set up

I. Introduction Docker is great to use, especially when it comes to DevOps practices. However, when you pull mirrors in China or locally, you often encounter various "constipation" - either the mirror pull is slow, or the connection is intermittent, or the connection times out! When our images are large (like someone dropped a Warcr ...

Posted by genom on Tue, 17 May 2022 13:01:00 +0300

Operating system process scheduling experiment report

1. Implement four different and process scheduling algorithms: First come first service, time slice rotation, priority scheduling and short job priority scheduling algorithms. 2. Understand the concepts of process control block and process queue through experiments. 1. Run the code in the material and observe whether the execution result i ...

Posted by Sk8Er_GuY on Tue, 17 May 2022 03:39:12 +0300

Git common commands

Git common commands New code base git clone Create a new Git repository in the current directory $ git init Create a new directory and initialize it as a Git repository $ git init [project-name] Download a project and its entire code history $ git clone [url] configure git config Git's setting file is .gitconfig, which can be in t ...

Posted by mr_tron on Mon, 16 May 2022 23:48:59 +0300

Bash trick: Shell script that can move and rotate Tetris left and right

In Linux bash, the previous article introduced a shell script that uses the k, j, h, l keys to move a single block up, down, left, and right. The following continues to describe how to rotate a single block. Execution effect The specific implementation effect is as follows: Screenshot before rotation Screenshot after moving and rotating When ...

Posted by hammadtariq on Mon, 16 May 2022 21:58:38 +0300