Add linux notes
This commit is contained in:
2
linux/linux_general.txt
Executable file
2
linux/linux_general.txt
Executable file
@@ -0,0 +1,2 @@
|
||||
wifi:
|
||||
https://raspberrypi.stackexchange.com/questions/109425/ubuntu-server-18-wifi-hotspot-setup
|
||||
6
linux/linux_users.txt
Executable file
6
linux/linux_users.txt
Executable file
@@ -0,0 +1,6 @@
|
||||
adduser oleg20111511
|
||||
sudo usermod -a -G sudo oleg20111511
|
||||
|
||||
ssh-copy-id
|
||||
|
||||
chgrp oleg20111511 /var/www
|
||||
18
linux/mysql_commands.txt
Executable file
18
linux/mysql_commands.txt
Executable file
@@ -0,0 +1,18 @@
|
||||
install:
|
||||
sudo apt install mysql-server
|
||||
sudo apt install libmysqlclient-dev
|
||||
|
||||
user creation:
|
||||
CREATE USER 'socialstore' IDENTIFIED BY 'socialstorepassword';
|
||||
SELECT user FROM mysql.user;
|
||||
|
||||
database creation:
|
||||
CREATE DATABASE StoreDatabase;
|
||||
GRANT ALL PRIVILEGES ON StoreDatabase.* TO socialstore;
|
||||
|
||||
database management:
|
||||
USE StoreDatabase;
|
||||
SHOW TABLES;
|
||||
|
||||
installation:
|
||||
|
||||
17
linux/postgres_commands.txt
Executable file
17
linux/postgres_commands.txt
Executable file
@@ -0,0 +1,17 @@
|
||||
Start:
|
||||
su postgres
|
||||
psql
|
||||
|
||||
Show databases:
|
||||
\l
|
||||
|
||||
Switch to database:
|
||||
\c [name]
|
||||
|
||||
Show tables
|
||||
\dt
|
||||
|
||||
Create new database and user:
|
||||
create database mydb;
|
||||
create user myuser with encrypted password 'mypass';
|
||||
grant all privileges on database mydb to myuser;
|
||||
Reference in New Issue
Block a user