linux安装64位mysql
时间: 2023-10-24 20:10:04 浏览: 87
安装64位MySQL的步骤如下:
1. 下载64位MySQL安装包,可以到官网下载:https://dev.mysql.com/downloads/mysql/
2. 安装依赖库:sudo apt-get install libaio1
3. 解压安装包:tar -zxvf mysql-5.7.34-linux-glibc2.12-x86_64.tar.gz
4. 移动文件夹:sudo mv mysql-5.7.34-linux-glibc2.12-x86_64 /usr/local/mysql
5. 添加环境变量:sudo vim /etc/profile,在文件末尾添加以下内容:
export PATH=$PATH:/usr/local/mysql/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/mysql/lib
6. 使环境变量生效:source /etc/profile
7. 初始化MySQL:cd /usr/local/mysql/bin,运行sudo ./mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
8. 启动MySQL:sudo ./mysql.server start
阅读全文