mysql 5.6 64 位安装 缺少libai.so_安装mysql

1、下载mysql-5.6.10-winx64.zip(官网没有64位msi安装文件,否则不用手动配置这么麻烦);

2、 解压至某一目录,比如D:\code\mysql-5.6.10-winx64,这是MySQL的程序目录;

3、将D:\code\mysql-5.6.10-winx64\bin添加到path环境变量;

4、新建一目录,作为MySQL数据目录,如D:\code\mysql_data,将D:\code\mysql-5.6.10-winx64\data复制到D:\code\mysql_data\data,这里面有MySQL自带的数据库和一些日志文件;

5、将D:\code\mysql-5.6.10-winx64里的my-default.ini配置文件移到D:\code\mysql_data,重命名为my.ini,当然也可以不这样组织目录结构,系统搜索my.ini选项文件的顺序可以参看http://dev.mysql.com/doc/refman/5.1/en/option-files.html;

6、编写my.ini文件,比如我的:

[WinMySQLAdmin]

Server=D:/code/mysql-5.6.10-winx64/bin/mysqld.exe

[client]

no-beep

#pipe

#socket=mysql

port=3306

[mysql]

default-character-set=utf8

#Foradviceonhowtochangesettingspleasesee

#http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html

#***DONOTEDITTHISFILE.It'satemplatewhichwillbecopiedtothe

#***defaultlocationduringinstall,andwillbereplacedifyou

#***upgradetoanewerversionofMySQL.

[mysqld]

explicit_defaults_for_timestamp=TRUE

#Removeleading#andsettotheamountofRAMforthemostimportantdata

#cacheinMySQL.Startat70%oftotalRAMfordedicatedserver,else10%.

innodb_buffer_pool_size=2G

#Removeleading#toturnonaveryimportantdataintegrityoption:logging

#changestothebinarylogbetweenbackups.

#log_bin

#Thesearecommonlyset,removethe#andsetasrequired.

basedir="D:\code\mysql-5.6.10-winx64\"

datadir="D:\code\mysql_data\data\"

port=3306

server_id=1

general-log=0

general_log_file="mysql_general.log"

slow-query-log=1

slow_query_log_file="mysql_slow_query.log"

long_query_time=10

log-error="mysql_error_log.err"

default-storage-engine=INNODB

max_connections=1024

query_cache_size=128M

key_buffer_size=128M

innodb_flush_log_at_trx_commit=1

innodb_thread_concurrency=128

innodb_autoextend_increment=128M

tmp_table_size=128M

#Removeleading#tosetoptionsmainlyusefulforreportingservers.

#TheserverdefaultsarefasterfortransactionsandfastSELECTs.

#Adjustsizesasneeded,experimenttofindtheoptimalvalues.

#join_buffer_size=128M

#sort_buffer_size=2M

#read_rnd_buffer_size=2M

#sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

character-set-server=utf8

其中

[WinMySQLAdmin]

Server=D:/code/mysql-5.6.10-winx64/bin/mysqld.exe

组是我net start mysql后控制台提示出错,找不到指定文件后添加的,

explicit_defaults_for_timestamp=TRUE

属性是mysqld --install MySQL --defaults-file=D:\code\mysql_data\my.ini后提示

[Warning]TIMESTAMPwithimplicitDEFAULTvalueisdeprecated.

Pleaseuse--explicit_defaults_for_timestampserveroption(see

documentationformoredetails).

添加的,

basedir="D:\code\mysql-5.6.10-winx64\"

datadir="D:\code\mysql_data\data\"

分别指向MySQL的程序目录和数据目录,注意写路径时可能出现的一些错误,如双引号、路径分隔符,其余的属性主要是优化MySQL配置的,可以通过show status查看;

7、输入mysqld --install MySQL --defaults-file=D:\code\mysql_data\my.ini命令,将mysql作为win系统服务,如果出错或想重命名服务名,可以mysqld --remove,具体可以看http://dev.mysql.com/doc/refman/5.1/en/windows-start-service.html;

8、输入net start mysql启动服务;

OK,现在就可以通过mysql -h127.0.0.1 -P3306 -utest -p来跑数据库了。

分享到:

18e900b8666ce6f233d25ec02f95ee59.png

72dd548719f0ace4d5f9bca64e1d7715.png

2015-09-13 12:14

浏览 62

评论

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值