MySQL常用操作语句
1、登陆和进入指定数据库:
mysql -u root -p
mysql -h localhost -u root -p database_name
2、列出所有数据库:
show databases;
3、列出所有用户:
SELECT DISTINCT CONCAT('User: ''',user,'''@''',host,''';') AS query FROM mysql.user;
4、修改指定用户的密码:
SET PASSWORD FOR 'bob'@'%.example.org' = PASSWORD('cleartext password');