ubuntu 14.04 安装 mysql
程序员文章站
2022-05-09 21:16:51
...
首先需要下载mysql
下载地址为:https://www.mysql.com/downloads/
下载之后为tar文件,
这里是用的5.7.19版本 mysql-server_5.7.19-1ubuntu14.04_amd64.deb-bundle.tar
在服务器上先解压这个tar文件 #tar -xvf 文件
解压之后:
解压包 写道
libmysqlclient20_5.7.19-1ubuntu14.04_amd64.deb
libmysqlclient-dev_5.7.19-1ubuntu14.04_amd64.deb
libmysqld-dev_5.7.19-1ubuntu14.04_amd64.deb
mysql-client_5.7.19-1ubuntu14.04_amd64.deb
mysql-common_5.7.19-1ubuntu14.04_amd64.deb
mysql-community-client_5.7.19-1ubuntu14.04_amd64.deb
mysql-community-server_5.7.19-1ubuntu14.04_amd64.deb
mysql-community-source_5.7.19-1ubuntu14.04_amd64.deb
mysql-community-test_5.7.19-1ubuntu14.04_amd64.deb
mysql-server_5.7.19-1ubuntu14.04_amd64.deb
mysql-testsuite_5.7.19-1ubuntu14.04_amd64.deb
libmysqlclient-dev_5.7.19-1ubuntu14.04_amd64.deb
libmysqld-dev_5.7.19-1ubuntu14.04_amd64.deb
mysql-client_5.7.19-1ubuntu14.04_amd64.deb
mysql-common_5.7.19-1ubuntu14.04_amd64.deb
mysql-community-client_5.7.19-1ubuntu14.04_amd64.deb
mysql-community-server_5.7.19-1ubuntu14.04_amd64.deb
mysql-community-source_5.7.19-1ubuntu14.04_amd64.deb
mysql-community-test_5.7.19-1ubuntu14.04_amd64.deb
mysql-server_5.7.19-1ubuntu14.04_amd64.deb
mysql-testsuite_5.7.19-1ubuntu14.04_amd64.deb
命令 写道
sudo dpkg -i mysql-common_5.7.19-1ubuntu14.04_amd64.deb libmysqlclient20_5.7.19-1ubuntu14.04_amd64.deb libmysqlclient-dev_5.7.19-1ubuntu14.04_amd64.deb libmysqld-dev_5.7.19-1ubuntu14.04_amd64.deb mysql-community-client_5.7.19-1ubuntu14.04_amd64.deb mysql-client_5.7.19-1ubuntu14.04_amd64.deb mysql-community-server_5.7.19-1ubuntu14.04_amd64.deb
安装可能会出现依赖不完整 可以用 sudo apt-get -f install
输入mysql的密码,即可;
查看是否安装成功:
service mysql start
需要远程链接的需要先改 /etc/mysql/mysql.conf.d 目录下的 mysqld.cnf 文件
将# bind-address= 127.0.0.1 注掉即可;
然后在给root 赋予远程链接的权限; username:用户名; password:密码
grant all on *.* to [email protected]"%" Identified by "password";
flush privileges;
上一篇: python爬虫绝对领域