mirror of
https://github.com/namibia/awesome-cheatsheets.git
synced 2024-11-24 13:47:36 +00:00
docs: mysql
This commit is contained in:
parent
b443850b2a
commit
d787d6cf8d
@ -9,11 +9,10 @@ SHOW PROCESSLIST; # Show you any queries that are currently running or in the qu
|
|||||||
|
|
||||||
show status where `variable_name` = 'Threads_connected'; # Show all connected threads
|
show status where `variable_name` = 'Threads_connected'; # Show all connected threads
|
||||||
show variables like 'max_connections'; # Show maximum number of allowed connections
|
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)
|
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
|
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
|
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password'; # Create user
|
||||||
|
|
||||||
mysql -u root -pmypassword -e "MY SQL QUERY" &>> query.log & disown # Run SQL query in the background
|
mysql -u root -pmypassword -e "MY SQL QUERY" &>> query.log & disown # Run SQL query in the background
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user