1、Column ‘classid’ in field list is ambiguous
解决方法:
use messages;
select c.classid,s.studentid,s.studentname,c.classname,s.studentsex,s.studentage,
sc.score from class c,student s,score sc where (s.studentid=sc.studentid and
sc.classid = c.classid) and s.studentname=”jane”;
- 2、使用xshell插入数据库数据后出现乱码
解决方法:
http://cenalulu.github.io/mysql/mysql-mojibake/
将已经显示错误的数据库数据转换为正确编码utf8的数据方法:
- 3、select后出现中文乱码
现象:
解决方法:
https://segmentfault.com/a/1190000002919949
[root@iZ94brrnxu5Z etc]# mysql -u root -p –default-character-set=utf8
- 4、创建数据库用户
a、创建用户名及密码:
b、授权:
将数据库中的某张表的权限授权给用户jane
c、刷新数据