《MYSQL教程mysql 5.7.14 免安装版注意事项(精)》要点:
本文介绍了MYSQL教程mysql 5.7.14 免安装版注意事项(精),希望对您有用。如果有疑问,可以联系我们。
MYSQL实例相关阅读:
MYSQL实例MySql 5.7.14 安装教程详解(解压版)
MYSQL实例Mysql 5.7.14 使用常见问题汇总(推荐)
MYSQL实例1、解压
MYSQL实例2、在目录D:\Program Files\mysql-5.7.14-winx64下复制my-default.ini,放在与其相同目录下,名称显示为my.ini;
MYSQL实例3、编辑my.ini
MYSQL实例
# 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.
[client]
default-character-set=utf8
[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 = D:\Program Files\mysql-5.7.14-winx64
datadir = D:\Program Files\mysql-5.7.14-winx64\data
tmpdir = D:\Program Files\mysql-5.7.14-winx64\data
socket = D:\Program Files\mysql-5.7.14-winx64\data\mysql.sock
port = 3306
# server_id = .....
max_connections = 100
table_open_cache = 256
query_cache_size = 1M
tmp_table_size = 32M
thread_cache_size = 8
innodb_data_home_dir = D:\Program Files\mysql-5.7.14-winx64\data
innodb_flush_log_at_trx_commit = 1
innodb_log_buffer_size = 128M
innodb_buffer_pool_size = 128M
innodb_log_file_size = 10M
innodb_thread_concurrency = 16
innodb-autoextend-increment = 1000
# 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
join_buffer_size = 128M
sort_buffer_size = 32M
read_rnd_buffer_size = 32M
max_allowed_packet = 32M
explicit_defaults_for_timestamp = true
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
MYSQL实例4、在解压目录D:\Program Files\mysql-5.7.14-winx64下新建data文件(不用在文件夹做其他操作)
MYSQL实例5、以管理员身份进入cmd界面(必须是管理员)
MYSQL实例6、切换至mysql解压目录\bin下,初始化data目录
MYSQL实例输入命令:mysqld --initialize-insecure (生成无密码的root用户)
MYSQL实例或:mysqld --initialize(生成带随机密码的root用户)
MYSQL实例7、初始化完成后启动mysql服务
MYSQL实例输入命令:net start mysql
MYSQL实例8、开始使用mysql
MYSQL实例输入命令:mysql -u root -p
MYSQL实例9、停止mysql服务
MYSQL实例输入命令:net stop mysql
MYSQL实例10、忘记root密码后如何登录
MYSQL实例 101、 关闭正在运行的MySQL服务.
MYSQL实例 10.2、 打开DOS窗口,转到mysql\bin目录.
MYSQL实例 10.3、输入mysqld --skip-grant-tables 回车.--skip-grant-tables 的意思是启动MySQL服务的时候跳过权限表认证.
MYSQL实例 10.4、再开一个DOS窗口(因为刚才那个DOS窗口已经不能动了),转到mysql\bin目录.
MYSQL实例 10.5、输入mysql回车,如果成功,将出现MySQL提示符 >.
MYSQL实例 10.6、连接权限数据库: use mysql; .
MYSQL实例 10.7、改密码:update user set password=password("123") where user="root";(别忘了最后加分号) .
MYSQL实例 10.8、刷新权限(必须步骤):flush privileges; .
MYSQL实例 10.9、 退出 quit.
MYSQL实例 10.10、注销系统,再进入,使用用户名root和刚才设置的新密码123登录.
MYSQL实例11、修改root用户密码
MYSQL实例5.7版本以前:
MYSQL实例
update user set authentication_string =password( 'root') where user = 'root;
MYSQL实例5.7版本以后:
MYSQL实例
update user set password=password( 'root') where user = 'root;
MYSQL实例以上所述是小编给大家介绍的mysql 5.7.14 免安装版注意事项(精),希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的.在此也非常感谢大家对维易PHP网站的支持!