mysql安装

1、

百度软件上下载了mysql版本

mysql-5.6.24-win32.1432006610.zip

2、

解压缩到目录:

E:\tool\mysql-5.6.24-win32.1432006610\mysql-5.6.24-win32

3、

然后在目录下创建mycommand.bat用来快捷进入目录。

Mycommand.bat内容:

Cmd

 

//注意cmd后面回车行。

4、

启动服务

E:\tool\mysql-5.6.24-win32.1432006610\mysql-5.6.24-win32>cd bin

E:\tool\mysql-5.6.24-win32.1432006610\mysql-5.6.24-win32\bin>mysqld.exe

2015-11-13 15:16:24 0 [Warning] TIMESTAMP with implicit DEFAULT value is depreca

ted. Please use --explicit_defaults_for_timestamp server option (see documentati

on for more details).

2015-11-13 15:16:24 0 [Note] mysqld.exe (mysqld 5.6.24) starting as process 5344

 ...

 

如上显示表示服务已经启动。

 

5、

验证数据库

E:\tool\mysql-5.6.24-win32.1432006610\mysql-5.6.24-win32\bin>mysqladmin --version

mysqladmin  Ver 8.42 Distrib 5.6.24, for Win32 on x86

 

如上显示mysql的版本号码

 

6、

使用MySQL客户端执行简单的SQL命令

E:\tool\mysql-5.6.24-win32.1432006610\mysql-5.6.24-win32\bin>mysql

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 1

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> show databases;

+--------------------+

| Database           |

+--------------------+

| information_schema |

| test               |

+--------------------+

 

以上是显示数据库信息的sql语句。

 

7、

数据库安装后会有一个root的空密码的用户,需要重新设置密码,以下是对root的重新设定密码1,然后再用root登录mysql

E:\tool\mysql-5.6.24-win32.1432006610\mysql-5.6.24-win32\bin>mysqladmin -u root

password "1"

Warning: Using a password on the command line interface can be insecure.

 

E:\tool\mysql-5.6.24-win32.1432006610\mysql-5.6.24-win32\bin>mysql -u root -p

Enter password: *

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 6

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> exit

Bye

 

E:\tool\mysql-5.6.24-win32.1432006610\mysql-5.6.24-win32\bin>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值