CentOS 6.5 源码安装MySQL5.6
1:下载安装cmake (mysql5.5以后是通过cmake来编译的)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
|
2:创建mysql的安装目录及数据库存放目录
1 2 |
|
3:创建mysql用户及用户组
1 |
|
1 |
|
4:安装mysql
1 |
|
[[email protected] gechong]# ls
mysql
[[email protected] gechong]# pwd
/gechong
1 |
[[email protected] gechong]# tar -zxv -f /root/mysql-5.6.21.tar.gz
[[email protected] gechong]# cd mysql-5.6.21/
编译:
1 2 3 4 5 6 7 |
|
报错了:
1 2 3 4 5 6 7 8 9 10 11 |
|
1 |
|
1 |
|
重新编译:
# make clean
# rm -f CMakeCache.txt
# rm -rf /etc/my.cnf
1 2 3 4 5 6 7 |
|
1 |
|
很慢。。。等着吧
5:配置MySQL
1 |
|
6:
1 |
|
7:初始化权限表
1 |
|
8:启动MySQL服务
1 2 3 |
|
10:之后空用户登陆MySQL,删除空用户,对用户赋权限。
http://blog.csdn.net/langeldep/article/details/6223649