mysqlcommands
This is an old revision of the document!
MySQL Commands
mysql -u root -p mysql -h ubuntu-vb -u root -p mysql -u root -p football select version(), current_date; select version(), now(); create database football; use football; select database(); show tables; mysqlshow -u root -p --count football show binary logs; show master status; flush binary logs; grant all on football.* to 'user'@'localhost'; show status like '%Connections%'; show variables like '%bin%';
Passwords and User Accounts
Global variables can be used to manage user passwords …
These can be overridden at the user level.
default_password_lifetime = 120 (Time in days before password expires) password_history = 5 (Number of passwords that must be different) password_reuse_interval = 180 (Prohibit reuse of passwords during number of days specified) alter user 'ian'@'localhost' password expire; alter user 'ian'@'localhost' password expire never; alter user 'ian'@'localhost' password expire interval 180 day; alter user 'ian'@'localhost' password history default; alter user 'ian'@'localhost' password history 2; alter user 'ian'@'localhost' password reuse interval 360; alter user 'ian'@'localhost' account lock;
mysqlcommands.1549383809.txt.gz · Last modified: 2025/03/08 22:23 (external edit)