安装配置MYSQL5.5

windows环境下,下载mysql-noinstall版本,需要进行简要配置

将zip包解压到D:\,mysql的根路径即为 D:\mysql

该目录下有多个配置文件,如my-huge.ini、my-innodb-heavy-4G.ini、my-small.ini……

将其中一个(如my-small.ini)重命名为my.ini

 

见以下红色部分修改

# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = MySQL
default-character-set=utf8

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port = 3306
socket = MySQL
basedir=D:\\mysql
datadir=D:\\mysql\\data
character-set-server=utf8
skip-locking
key_buffer_size = 16K
max_allowed_packet = 1M
table_open_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 128K

 

配置环境变量

path=D:\mysql\bin;...

 

启动mysql服务

D:>mysqld

 

关闭mysql服务

D:>mysqladmin -u root shutdown

 

客户端连接

D:>mysql -u root

 

常用命令

show databases;

use $database;

show tables;

describe $table;

 

 

 

 

你可能感兴趣的:(技术开发,mysql)