Windows下解凍インストールmysql-5.7.11-winx 64
4802 ワード
1.ミラーによるmysqlのダウンロードhttp://mirrors.sohu.com/mysql/MySQL-5.7/mysql-5.7.11-winx64.zip 2.D:software 3に解凍します.D:softwaremysql-5.7.11-winx 64でmyを新規作成します.iniプロファイルの内容は次のとおりです.
4.Windowsシステム環境変数pathに、以下の内容を加える
D:\software\mysql-5.7.11-winx64\bin;(注意プラス符号)
5 . 初期化構成mysqld–initialize
6、mysqlをwindowsシステムサービスとして登録する具体的な操作は、コマンドラインで以下のコマンドを実行することである(管理者としてコマンドラインを実行する必要がある):binディレクトリに切り替える必要がある.そうしないと、サービスディレクトリはC:Program FilesMySQLMySQL Server 5.7mysqldサービスコマンドを追加する:mysqld install MySQL–defaults-file="D:softwaremysql-5.7.11-winx 64my.ini」削除サービスコマンドは、mysqld remove
7.ステップ6が成功した後、システムサービス管理を開く
mysqlシステムサービスはコマンドラインでmysqlコマンドを起動します:net start mysql閉じますmysqlコマンドは:net stop mysql
8.rootのパスワードを123789に変更
D:\software\mysql-5.7.11-winx64\bin>mysql -u root -p Enter password: **
仮パスワードD:softwaremysql-5.7.11-winx 64dataのmysql_error.logファイルでは、2016-02-19 T 14:37:5737157 Z 1[Note]A temporary password is generated forroot@localhost: :ebFk*c;u 1 ea(仮パスワード)Welcome to the MySQL monitor.Commands end with ; or\g. Your MySQL connection id is 3 Server version: 5.7.11
Copyright (c) 2000, 2016, 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.
#################### ###################
# 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]
port=3306
basedir ="D:/software/mysql-5.7.11-winx64/" #
datadir ="D:/software/mysql-5.7.11-winx64/data/"
tmpdir ="D:/software/mysql-5.7.11-winx64/data/"
socket ="D:/software/mysql-5.7.11-winx64/data/mysql.sock"
log-error="D:/software/mysql-5.7.11-winx64/data/mysql_error.log"
#server_id = 2
#skip-locking
max_connections=100
table_open_cache=256
query_cache_size=1M
tmp_table_size=32M
thread_cache_size=8
innodb_data_home_dir="D:/software/mysql-5.7.11-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
join_buffer_size = 128M
sort_buffer_size = 32M
read_rnd_buffer_size = 32M
max_allowed_packet = 32M
explicit_defaults_for_timestamp=true
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
#sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
#################### ###################
4.Windowsシステム環境変数pathに、以下の内容を加える
D:\software\mysql-5.7.11-winx64\bin;(注意プラス符号)
5 . 初期化構成mysqld–initialize
6、mysqlをwindowsシステムサービスとして登録する具体的な操作は、コマンドラインで以下のコマンドを実行することである(管理者としてコマンドラインを実行する必要がある):binディレクトリに切り替える必要がある.そうしないと、サービスディレクトリはC:Program FilesMySQLMySQL Server 5.7mysqldサービスコマンドを追加する:mysqld install MySQL–defaults-file="D:softwaremysql-5.7.11-winx 64my.ini」削除サービスコマンドは、mysqld remove
7.ステップ6が成功した後、システムサービス管理を開く
mysqlシステムサービスはコマンドラインでmysqlコマンドを起動します:net start mysql閉じますmysqlコマンドは:net stop mysql
8.rootのパスワードを123789に変更
D:\software\mysql-5.7.11-winx64\bin>mysql -u root -p Enter password: **
仮パスワードD:softwaremysql-5.7.11-winx 64dataのmysql_error.logファイルでは、2016-02-19 T 14:37:5737157 Z 1[Note]A temporary password is generated forroot@localhost: :ebFk*c;u 1 ea(仮パスワード)Welcome to the MySQL monitor.Commands end with ; or\g. Your MySQL connection id is 3 Server version: 5.7.11
Copyright (c) 2000, 2016, 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.
mysql> show databases;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement befo
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY '123789';
Query OK, 0 rows affected (0.00 sec)
mysql>