阿里云服务器上搭建mysql数据库
发布时间:2018-05-23 23:20,
浏览次数:382
, 标签:
mysql
(1)使用wget方式获取二进制源码包:https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.22
-linux-glibc2.12-x86_64.tar.gz
(2)解压到指定目录:tar -zxvf https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.22
-linux-glibc2.12-x86_64.tar.gz -C /home/mysql
(3)修改名字:mv mysql-5.7.22-linux-glibc2.12-x86_64 mysql-5.7.22
(4)初始化数据库:切换到bin目录下,./mysql -initialize –user=mysql –basedir=XXXX
–datadir=xxxx
(5)复制配置文件:切换到support-files目录下,cp -a my-default.cnf /etc/my.cnf;cp -a
mysql.server /etc/init.d/mysqld
(6)启动mysql:切换到bin目录下,./mysqld –user=mysql
错误记录:
(1)系统找不到errmsg.sys文件,到解压目录的share/english子目录下,复制errmsg.sys到 basedir的share目录下面;
(2)mysql.lock无法创建:编辑/ect/my.cnf,注释掉socket,mysql会自动找到一个临时的temp/mysql.lock
参考资料:http://www.mamicode.com/info-detail-1790594.html
原文链接:https://blog.csdn.net/weixin_39636226/article/details/113304950?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522165934461816782395392342%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=165934461816782395392342&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_ecpm_v1~times_rank-18-113304950-null-null.nonecase&utm_term=%E6%90%AD%E5%BB%BAcdn
原创文章,作者:优速盾-小U,如若转载,请注明出处:https://www.cdnb.net/bbs/archives/6348