Windows
windows系统-mysql压缩包安装教程:https://blog.csdn.net/we_are_the_world_123/article/details/79230537
The vervice already exists!-mysql安装服务问题解决
安装包下载
安装包安装配置
Linux
mysql-linux版本下载:https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.31-linux-glibc2.12-x86_64.tar.gz
安装教程:https://blog.csdn.net/qq_37598011/article/details/93489404
启动报错:
Starting MySQL.200107 16:35:31 mysqld_safe error: log-error set to ‘/var/log/mariadb/mariadb.log’, however file don’t exists. Create writable for user ‘mysql’.
ERROR! The server quit without updating PID file (/var/lib/mysql/server7.pid).
原因:没有路径也没有权限
解决方案:
创建路径:mkdir /var/log/mariadb
创建文件:touch /var/log/mariadb/mariadb.log
授予权限:chown -R mysql:mysql /var/log/mariadb/mariadb.log
linux下开机自启动
- 在以上步骤安装成功后执行以下步骤
- 赋予可执行权限:
chmod +x /etc/init.d/mysql
- 添加为服务:
chkconfig --add mysqld
- 查看服务列表:
chkconfig --list
- 重启计算机:
reboot