MySQL下载地址:
http://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.16-winx64.zip
配置环境变量:
我的解压地址为:
E:\develop_utils\mysql-5.7.16-winx64
在系统盘创建:
MYSQL_HOME
值:
E:\develop_utils\mysql-5.7.16-winx64
如图:
然后在path的值后面追加,记得分号别忘记了…
如图:
然后在doc里面去安装,就出现了标题所述的错误,看了别人的解决方案也木有解决问题,只有去看看错误提示了…,下图:
——————————2016年11月7日20:42:52—————————————-
停止MySQL:net stop mysql
开启MySQL:net start mysql
安装MySQL:
————————2016年11月8日22:22:12—————————————
登录mysql出现问题了。
ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO)
解决方案:停止mysql服务【net stop mysql】,在my.ini中添加
skip-grant-tables
如图所示:
启动mysql服务【net start mysql】,登录【mysql -u root -p】
创建数据库:
create database VincentDB; //VincentDB;数据库名字
查看数据库:
show databases;
判断当前时候存在数据库VincentDB有就删除
drop database if exists VincentDB;
使用某数据库
use VincentDB;//使用VincentDB数据库
查看数据库中的表:
show tables;//显示数据库中的表
这是个新的数据库,没有表..
判断数据库时候存在表vincent,存在就删除
drop table if exists vincent;//如果存在vincent表,就删除
创建表:
create table vincent(
id int auto_increment primary key,
name varchar(50),
sex varchar(20),
date varchar(20),
content varchar(1000)
)default charset = utf8;
查看表的约束
describe vincent;//查看表的vincent的约束条件
查询表中的数据
select * from vincent;//查询表中的所有数据
select id,name from vincent;//查询表中的数据,根据id,name查
向表中插入数据
insert into vincent values(null,"vincent","男","1992-4-12","......");
修改表中的数据
update vincent set sex = '男' where id=2;//把vincent表中id=2的一项sex改为男
删除表中的数据
delete from vincent where id = 3;
后面表的操作参照以下地址:
http://www.cnblogs.com/qinqinmeiren/archive/2011/05/21/2151693.html