学习Mysql的记录贴 记录的内容是 指令的试用
前言:操作系统是WIn7 64位 旗舰版 ,Mysql的版本是mysql-5.7.10-winx64
是社区版 就是所谓的最后的免费版本。 下载后 解压 然后配置my.ini文件。
××××××××××××××××××××××××××××××××××××××××××××××××××
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.
[mysqld]
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
# These are commonly set, remove the # and set as required.
# basedir = .....
# datadir = .....
# port = .....
# server_id = .....
loose-default-character-set=utf8
basedir="C:/05_study/mysql-5.7.10-winx64"
datadir="C:/05_study/mysql-5.7.10-winx64/data"
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
[client]
loose-default-character-set=utf8
[WinMySQLadmin]
Server=C:/05_study/mysql-5.7.10-winx64/bin/mysqld.exe
character-set-server=utf8
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
×××××××××××××××××××××××××××××××××××××××××××××××××××
上面星号包含的内容就是配置文件。
PS:特别注意 这个路径下的C:/05_study/mysql-5.7.10-winx64/data 不是手动创建的。
哪些在命令行里面安装数据库和启动数据库服务的指令,目前就不测试了啦。(注意命令行的CMD这个指令是要已管理员权限运行)
下面开始登录数据库。(登录之前要使用cd指令 把路径切换到 C:\05_study\mysql-5.7.10-winx64\bin)
×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
mysql -u root -p
说明: 账户名叫root 密码是空的
登录后的效果。
C:\05_study\mysql-5.7.10-winx64\bin>mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.10 MySQL Community Server (GPL)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
修改密码为root.
http://blog.csdn.net/pumaadamsjack/article/details/2044565
********
http://www.cnblogs.com/good_hans/archive/2010/03/29/1700046.html