ubuntu下Mysql
1. 安装 sudo apt-get install mysql-server
命令:
1. root登陆 $mysql -u root
$mysql -u 用户名 -p 然后输入密码
查询当前用户select user();
修改密码
use mysql;
select host,user,password from user;
UPDATE user SET password=PASSWORD('123456') WHERE user='streetpasser';
2. 权限
grant 权限 on 数据库对象 to 用户
grant select, insert, update, deleteon testdb.*to streetpasser@'%'
grant all on *.* to streetpasser@'localhost' 赋予全部权限
http://www.cnblogs.com/hcbin/archive/2010/04/23/1718379.html
3. 列出数据库show databases;
选择数据库use databaseName;
查询当前数据库select database();