使用環境
win7 32bit
myslq 5.7
行った手順
①インストール後、環境変数にbinのパスを追記 ;C:\Program Files\MySQL\MySQL Server 5.7\bin
②cmdでmysqlにmysql -u root -p でログイン確認
③timezone_posixをcmdに貼り付けタイムゾーン設定
⑤my.iniのSERVER SECTIONにdefault-time-zone = 'Japan'を追記
④windowsサービスでmysql57を一度停止して、再度開始すると、状態 "開始中"になりmysqlへ接続出来なくなる
⑤でのエラーコード
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)
mysqlのログのwarning部分
2019-10-31T07:45:32.409326Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key 2019-10-31T08:14:27.103784Z 0 [Warning] C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe: Forcing close of thread 8 user: 'root'
my.ini
# Other default tuning values # MySQL Server Instance Configuration File # ---------------------------------------------------------------------- # Generated by the MySQL Server Instance Configuration Wizard # # # Installation Instructions # ---------------------------------------------------------------------- # # On Linux you can copy this file to /etc/my.cnf to set global options, # mysql-data-dir/my.cnf to set server-specific options # (@localstatedir@ for this installation) or to # ~/.my.cnf to set user-specific options. # # On Windows you should keep this file in the installation directory # of your server (e.g. C:\Program Files\MySQL\MySQL Server X.Y). To # make sure the server reads the config file use the startup option # "--defaults-file". # # To run the server from the command line, execute this in a # command line shell, e.g. # mysqld --defaults-file="C:\Program Files\MySQL\MySQL Server X.Y\my.ini" # # To install the server as a Windows service manually, execute this in a # command line shell, e.g. # mysqld --install MySQLXY --defaults-file="C:\Program Files\MySQL\MySQL Server X.Y\my.ini" # # And then execute this in a command line shell to start the server, e.g. # net start MySQLXY # # # Guidelines for editing this file # ---------------------------------------------------------------------- # # In this file, you can use all long options that the program supports. # If you want to know the options a program supports, start the program # with the "--help" option. # # More detailed information about the individual options can also be # found in the manual. # # For advice on how to change settings please see # https://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html # # # CLIENT SECTION # ---------------------------------------------------------------------- # # The following options will be read by MySQL client applications. # Note that only client applications shipped by MySQL are guaranteed # to read this section. If you want your own MySQL client program to # honor these values, you need to specify it as an option during the # MySQL client library initialization. # [client] # pipe= # socket=MYSQL port=3306 [mysql] no-beep # default-character-set= # SERVER SECTION # ---------------------------------------------------------------------- # # The following options will be read by the MySQL Server. Make sure that # you have installed the server correctly (see above) so it reads this # file. # # server_type=2 [mysqld] default-time-zone = 'Japan' # The next three options are mutually exclusive to SERVER_PORT below. # skip-networking # enable-named-pipe # shared-memory # shared-memory-base-name=MYSQL # The Pipe the MySQL Server will use # socket=MYSQL # The TCP/IP Port the MySQL Server will listen on port=3306 # Path to installation directory. All paths are usually resolved relative to this. # basedir="C:/Program Files/MySQL/MySQL Server 5.7/" # Path to the database root datadir=C:/ProgramData/MySQL/MySQL Server 5.7/Data # The default character set that will be used when a new schema or table is # created and no character set is defined # character-set-server= # The default storage engine that will be used when create new tables when default-storage-engine=INNODB # Set the SQL mode to strict sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" # General and Slow logging. log-output=FILE general-log=0 general_log_file="PC-20140.log" slow-query-log=1 slow_query_log_file="PC-20140-slow.log" long_query_time=10 # Error Logging. log-error="PC-20140.err" # ***** Group Replication Related ***** # Specifies the base name to use for binary log files. With binary logging # enabled, the server logs all statements that change data to the binary # log, which is used for backup and replication. # log-bin # ***** Group Replication Related ***** # Sets the binary logging format, and can be any one of STATEMENT, ROW, # or MIXED. ROW is suggested for Group Replication. # binlog_format # ***** Group Replication Related ***** # Causes the master to write a checksum for each event in the binary log. # binlog_checksum supports the values NONE (disabled) and CRC32. # The default is CRC32. When disabled (value NONE), the server verifies # that it is writing only complete events to the binary log by writing # and checking the event length (rather than a checksum) for each event. # NONE must be used with Group Replication. # binlog_checksum # ***** Group Replication Related ***** # The base name for the relay log. The server creates relay log files in # sequence by adding a numeric suffix to the base name. If you specify this # option, the value specified is also used as the base name for the relay log # index file. Relay logs increase speed by using load-balancing between disks. relay_log="PC-20140-relay" # ***** Group Replication Related ***** # Specifies the server ID. For servers that are used in a replication topology, # you must specify a unique server ID for each replication server, in the # range from 1 to 2^32 − 1. “Unique” means that each ID must be different # from every other ID in use by any other replication master or slave. server-id=1 # ***** Group Replication Related ***** # The host name or IP address of the slave to be reported to the master # during slave registration. This value appears in the output of SHOW SLAVE HOSTS # on the master server. Leave the value unset if you do not want the slave to # register itself with the master. # report_host=0.0 # ***** Group Replication Related ***** # The TCP/IP port number for connecting to the slave, to be reported to the master during # slave registration. Set this only if the slave is listening on a nondefault port or if # you have a special tunnel from the master or other clients to the slave. report_port=3306 # ***** Group Replication Related ***** # This option specifies whether global transaction identifiers (GTIDs) are # used to identify transactions. ON must be used with Group Replication. # gtid_mode # ***** Group Replication Related ***** # When enabled, the server enforces GTID consistency by allowing execution of # only statements that can be safely logged using a GTID. You must set this # option to ON before enabling GTID based replication. # enforce_gtid_consistency # ***** Group Replication Related ***** # Whether updates received by a slave server from a master server should be # logged to the slave's own binary log. Binary logging must be enabled on # the slave for this variable to have any effect. ON must be used with # Group Replication. # log_slave_updates # ***** Group Replication Related ***** # Determines whether the slave server logs master status and connection information # to an InnoDB table in the mysql database, or to a file in the data directory. # The TABLE setting is required when multiple replication channels are configured. # master_info_repository # ***** Group Replication Related ***** # Determines whether the slave server logs its position in the relay logs to an InnoDB # table in the mysql database, or to a file in the data directory. The TABLE setting is # required when multiple replication channels are configured. # relay_log_info_repository # ***** Group Replication Related ***** # Defines the algorithm used to hash the writes extracted during a transaction. If you # are using Group Replication, this variable must be set to XXHASH64 because the process # of extracting the writes from a transaction is required for conflict detection on all # group members. # transaction_write_set_extraction lower_case_table_names=1 # Secure File Priv. secure-file-priv="C:/ProgramData/MySQL/MySQL Server 5.7/Uploads" # The maximum amount of concurrent sessions the MySQL server will # allow. One of these connections will be reserved for a user with # SUPER privileges to allow the administrator to login even if the # connection limit has been reached. max_connections=151 # The number of open tables for all threads. Increasing this value # increases the number of file descriptors that mysqld requires. # Therefore you have to make sure to set the amount of open files # allowed to at least 4096 in the variable "open-files-limit" in # section [mysqld_safe] table_open_cache=2000 # Maximum size for internal (in-memory) temporary tables. If a table # grows larger than this value, it is automatically converted to disk # based table This limitation is for a single table. There can be many # of them. tmp_table_size=80M
windowsサービスでmysql57を再起動した後接続できなくなります。
mysql自体が立ち上がってないようですので、iniファイルに何か問題がないかと睨めっこしています・・・
是非お力添えをお願いしたいですm(__)m





回答1件
あなたの回答
tips
プレビュー