diff --git a/databases/mysql.sh b/databases/mysql.sh index 040ffe8..075e609 100644 --- a/databases/mysql.sh +++ b/databases/mysql.sh @@ -7,6 +7,10 @@ mysql -u username -p database_name < file.sql # Import d SHOW PROCESSLIST; # Show you any queries that are currently running or in the queue to run +show status where `variable_name` = 'Threads_connected'; # Show all connected threads +show variables like 'max_connections'; # Show maximum number of allowed connections +SET GLOBAL max_connections = 150; ## Set new value for maximum connections (no restart needed but for permanent change update my.cnf) + GRANT ALL PRIVILEGES ON prospectwith.* TO 'power'@'localhost' WITH GRANT OPTION; # Grant all privileges on database CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password'; # Create user diff --git a/languages/golang.md b/languages/golang.md index 11e7dfd..fcb35fa 100644 --- a/languages/golang.md +++ b/languages/golang.md @@ -641,7 +641,7 @@ func TestSum(t *testing.T) { x, y := 2, 4 expected := 2 + 4 - if !reflect.DeepEqual(sum(x, y), expected) { + if !reflect.DeepEqual(Sum(x, y), expected) { t.Fatalf("Function Sum not working as expected") } } diff --git a/tools/macos.sh b/tools/macos.sh new file mode 100644 index 0000000..961a1db --- /dev/null +++ b/tools/macos.sh @@ -0,0 +1 @@ +sudo lsof -i -P | grep LISTEN # List all processes running on a specific port diff --git a/tools/ubuntu.sh b/tools/ubuntu.sh index 8d3d2d4..787aae1 100644 --- a/tools/ubuntu.sh +++ b/tools/ubuntu.sh @@ -17,3 +17,5 @@ sudo -s # Log as root cat /proc//maps # Show the current virtual memory usage of a Linux process ip r # Display ip of the server + +lsof -i :9000 # List process running on port 9000