发布于 2016-01-06 08:43:31 | 428 次阅读 | 评论: 0 | 来源: PHPERZ

这里有新鲜出炉的Mysql教程,程序狗速度看过来!

Mysql关系型数据库管理系统

MySQL是一个开放源码的小型关联式数据库管理系统,开发者为瑞典MySQL AB公司。MySQL被广泛地应用在Internet上的中小型网站中。由于其体积小、速度快、总体拥有成本低,尤其是开放源码这一特点,许多中小型网站为了降低网站总体拥有成本而选择了MySQL作为网站数据库。


  1. 下载最新的MySQL: http://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.10-winx64.zip
  2. 解压到:D:\mysql
  3. 新建文件my.ini,内容如下:  
[mysqld]


# These are commonly set, remove the # and set as required.
basedir=D:/greensoft/mysql
datadir=D:/greensoft/mysql/data
tmpdir=D:/greensoft/mysql/data
port = 3306

   4. 以管理员身份运行CMD,运行:D:\mysql\bin\mysqld install
   5. 初始化data目录(运行此命令前,不要创建data目录):D:\mysql\bin\mysqld--initialize
   6. 运行mysql服务:net start mysql
   7. 
\bin目录下输入mysql -uroot -p ,默认是没有密码的,出现ERROR 1045 (28000): Access denied for user'root'@'localhost'(using password: YES)的错误。
      解决办法:将my.ini中

#skip-grant-tables

更改为:

skip-grant-tables

重启mysql服务,就可以进入。

  8. 修改密码:
    MySQL 5.7.6以及最新版本:

# mysql> update user set authentication_string=PASSWORD('newpass') where User='root';

    Mysql 5.7.5或更早版本:

# mysql> update user set password=PASSWORD('newpass') where User='root';

 9. 还原第7步的更改,重启mysql服务。



最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务