mirror of
https://github.com/namibia/awesome-cheatsheets.git
synced 2024-11-25 06:07:34 +00:00
docs: mysql update
This commit is contained in:
parent
a2d51368dc
commit
b443850b2a
@ -7,8 +7,13 @@ 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)
|
||||
|
||||
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
|
||||
|
||||
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