my.inijava
[mysql]
# 設置mysql客戶端默認字符集
default-character-set=utf8
[mysqld]
#設置3306端口
port = 3306
# 設置mysql的安裝目錄
basedir=D:\winApp\mysql-5.7.24-winx64
# 設置mysql數據庫的數據的存放目錄
datadir=D:\winApp\mysql-5.7.24-winx64\data
# 容許最大鏈接數
max_connections=200
# 服務端使用的字符集默認爲8比特編碼的latin1字符集
character-set-server=utf8
# 建立新表時將使用的默認存儲引擎
default-storage-engine=INNODBmysql
#C:\Users\Administrator>mysqld --remove mysql
#Service successfully removed.
#
#C:\Users\Administrator>mysqld --initialize --user=mysql --console
#2018-11-15T10:34:38.528400Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is
# deprecated. Please use --explicit_defaults_for_timestamp server option (see doc
#umentation for more details).
#2018-11-15T10:34:39.423400Z 0 [Warning] InnoDB: New log files created, LSN=45790
#
#2018-11-15T10:34:39.733400Z 0 [Warning] InnoDB: Creating foreign key constraint
#system tables.
#2018-11-15T10:34:39.867400Z 0 [Warning] No existing UUID has been found, so we a
#ssume that this is the first time that this server has been started. Generating
#a new UUID: 0e7558c3-e8c2-11e8-9348-107b447f9b4a.
#2018-11-15T10:34:39.888400Z 0 [Warning] Gtid table is not ready to be used. Tabl
#e 'mysql.gtid_executed' cannot be opened.
#2018-11-15T10:34:42.721400Z 1 [Note] A temporary password is generated for root@
#localhost: S_Dwn?cZQ9a+ sql
#"C:\Program Files\MySQL\MySQL Server 5.7\mysqld" mysqld install MYSQL --defaults-file=D:\winApp\mysql-5.7.24-winx64\bin\my.ini數據庫
#D:\winApp\mysql-5.7.24-winx64\bin>mysqld --remove MYSQL
#Service successfully removed.
#
#D:\winApp\mysql-5.7.24-winx64\bin>mysqld --initialize --user=mysql --console
#2018-11-16T00:56:41.695000Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is
# deprecated. Please use --explicit_defaults_for_timestamp server option (see doc
#umentation for more details).
#2018-11-16T00:56:42.578000Z 0 [Warning] InnoDB: New log files created, LSN=45790
#
#2018-11-16T00:56:42.902000Z 0 [Warning] InnoDB: Creating foreign key constraint
#system tables.
#2018-11-16T00:56:43.081000Z 0 [Warning] No existing UUID has been found, so we a
#ssume that this is the first time that this server has been started. Generating
#a new UUID: 7be57493-e93a-11e8-aa59-107b447f9b4a.
#2018-11-16T00:56:43.109000Z 0 [Warning] Gtid table is not ready to be used. Tabl
#e 'mysql.gtid_executed' cannot be opened.
#2018-11-16T00:56:45.403000Z 1 [Note] A temporary password is generated for root@
#localhost: s(CUYMY=o4VL
#
#D:\winApp\mysql-5.7.24-winx64\bin>mysqld --install
#Service successfully installed.
#
#D:\winApp\mysql-5.7.24-winx64\bin>net start mysql
#MySQL 服務正在啓動 .
#MySQL 服務已經啓動成功。
#
#
#D:\winApp\mysql-5.7.24-winx64\bin>mysql -u root -p
#Enter password: ************
#Welcome to the MySQL monitor. Commands end with ; or \g.
#Your MySQL connection id is 7
#Server version: 5.7.24
#
#Copyright (c) 2000, 2018, 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.
#
#mysql> set password=xuzhi;
#ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
#corresponds to your MySQL server version for the right syntax to use near 'xuzhi
#' at line 1
#mysql> set password='xuzhi';
#Query OK, 0 rows affected (0.00 sec)this
-----------------------------------------------------------------------------------------------------------------編碼
mysql 數據庫java鏈接超時server
mysql -u root -p
Enter password: *****
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 13
Server version: 5.7.24 MySQL Community Server (GPL)ci
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.rem
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.input
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use xcwork;
Database changed
mysql> use mysql
Database changed
mysql> show tables
-> ;
+---------------------------+
| Tables_in_mysql |
+---------------------------+
| columns_priv |
| db |
| engine_cost |
| event |
| func |
| general_log |
| gtid_executed |
| help_category |
| help_keyword |
| help_relation |
| help_topic |
| innodb_index_stats |
| innodb_table_stats |
| ndb_binlog_index |
| plugin |
| proc |
| procs_priv |
| proxies_priv |
| server_cost |
| servers |
| slave_master_info |
| slave_relay_log_info |
| slave_worker_info |
| slow_log |
| tables_priv |
| time_zone |
| time_zone_leap_second |
| time_zone_name |
| time_zone_transition |
| time_zone_transition_type |
| user |
+---------------------------+
31 rows in set (0.00 sec)
mysql> select host from user;
+-----------+
| host |
+-----------+
| localhost |
| localhost |
| localhost |
+-----------+
3 rows in set (0.00 sec)
mysql> update user set host ='%' where user ='root';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> select host from user; +-----------+ | host | +-----------+ | % | | localhost | | localhost | +-----------+ 3 rows in set (0.00 sec)