mysql安装for windows
来源:互联网 发布:我的小公主 知乎 编辑:程序博客网 时间:2024/05/01 16:59
1.首先下载mysql文件包2.将下载到的mysql-5.6.24-x64.zip进行解压。
3.将解压得到的文件夹复制到相应的地方,例如D:/program file/mysql
4.进入文件夹内复制my-default.ini文件,并重命名为my.ini
5.在my.ini文件内添加如下几行。
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
basedir=D:\Program Files\mysql # mysql的位置
datadir=D:\Program Files\mysql\data # data的位置
max_connections=200 # 最大连接数
character-set-server=utf8 # 服务端字符集
default-storage-engine=INNODB # 存储模式
6.安装mysql 服务
以管理员身份运行cmd,进入dos后进入到mysql/bin/目录下,输入mysqld install 提示安装成功
D:\Program Files\mysql\bin>mysqld install
Service successfully installed.
7.启动mysql
D:\Program Files\mysql\bin>net start mysql
MySQL 服务正在启动 .
MySQL 服务已经启动成功。
8.进入mysql
D:\Program Files\mysql\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.6.24 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.
mysql>
--查看已经存在的数据库,这几个是安装时自动创建的
3.将解压得到的文件夹复制到相应的地方,例如D:/program file/mysql
4.进入文件夹内复制my-default.ini文件,并重命名为my.ini
5.在my.ini文件内添加如下几行。
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
basedir=D:\Program Files\mysql # mysql的位置
datadir=D:\Program Files\mysql\data # data的位置
max_connections=200 # 最大连接数
character-set-server=utf8 # 服务端字符集
default-storage-engine=INNODB # 存储模式
6.安装mysql 服务
以管理员身份运行cmd,进入dos后进入到mysql/bin/目录下,输入mysqld install 提示安装成功
D:\Program Files\mysql\bin>mysqld install
Service successfully installed.
7.启动mysql
D:\Program Files\mysql\bin>net start mysql
MySQL 服务正在启动 .
MySQL 服务已经启动成功。
8.进入mysql
D:\Program Files\mysql\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.6.24 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.
mysql>
--查看已经存在的数据库,这几个是安装时自动创建的
mysql>show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema|
| test |
+--------------------+
4 rowsin set (0.00 sec)
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema|
| test |
+--------------------+
4 rowsin set (0.00 sec)
--使用mysql 数据库
mysql> use mysql
Database changed
--查看 mysql 数据库下面的表
mysql> show tables;
+---------------------------+
| Tables_in_mysql |
+---------------------------+
| columns_priv |
| db |
| event |
| func |
| general_log |
| help_category |
| help_keyword |
| help_relation |
| help_topic |
| innodb_index_stats |
| innodb_table_stats |
| ndb_binlog_index |
| plugin |
| proc |
| procs_priv |
| proxies_priv |
| 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 |
+---------------------------+
28 rowsin set (0.66 sec)
--创建数据库zw
mysql> createdatabase zw;
Query OK, 1 row affected (0.62 sec)
--在zw数据库下面创建zw表
mysql> use zw;
Database changed
create table zw(id int,namechar(20));
mysql> show tables;
+--------------+
| Tables_in_zw |
+--------------+
| zw |
+--------------+
1 rowin set (0.00 sec)
--查看zw表结构
mysql> desc zw;
mysql> desc zw;
+-------+----------+------+-----+---------+-------+
| Field | Type | Null | Key |Default | Extra |
+-------+----------+------+-----+---------+-------+
| id | int(11) | YES | |NULL | |
| name | char(20) | YES | |NULL | |
+-------+----------+------+-----+---------+-------+
2 rowsin set (0.14 sec)
--查看zw数据库下的表
mysql> show tables;
+--------------+
| Tables_in_zw |
+--------------+
| zw |
+--------------+
1 rowin set (0.00 sec)
--向zw表里插入2条表记录
mysql> insertinto zw values(1,'zw');
Query OK, 1 row affected (0.01 sec)
mysql> insertinto zw values(2,'zt');
Query OK, 1 row affected (0.00 sec)
--查看表里的数据
mysql> select* from zw;
+------+------+
| id | name |
+------+------+
| 1 | zw |
| 2 | zt |
+------+------+
2 rowsin set (0.00 sec)
0 0
- Mysql For Windows安装
- mysql安装for windows
- mysql安装 for windows
- MySQL for Windows安装配置
- Mysql For Windows安装图解
- Mysql For Windows安装图解
- Mysql For Windows安装图解
- Mysql For Windows安装图解
- 第一章:mysql安装for windows
- DBI DBD-MYSQL 安装(for windows)
- mysql for windows 安装后无法使用
- MySQL安装详解(5.5.X For Windows)
- 【配置mysql 免安装版】 for windows
- MySQL for Windows 解压缩版配置安装
- MySQL 5.6 for Windows安装说明
- MySQL 5.6 for Windows 配置安装
- MySQL for Windows 解压缩版配置安装
- 基于Windows安装mysql for python支持
- 在CentOS 6.3 64bit上安装ATS 5.3 LTS版本并测试
- ARGB
- nargin
- !CodeForces 287B--(贪心、二分)
- waitUntilDone的含义
- mysql安装for windows
- 揭密:免费赠送背后的赚钱术
- glMapBuffer
- LoadRunner性能测试工具---(二)测试结果分析
- pscp 使用小结
- Android -- android activity 各种布局方式以及相关参数
- ios -- 虚拟键盘弹出挡住textfield的分析以及解决办法
- ASP.NET MVC学习时,自动导入数据库控制器和视图时遇到的问题
- Android Studio系列教程一--下载与安装