时间:2021-07-01 10:21:17 帮助过:38人阅读
现在Linux下的软件越来越好安装,尤其是在Ubuntu下安装软件,更是没有技巧,只需要在联网的情况下使用apt-get inatll 即可。在决
现在Linux下的软件越来越好安装,尤其是在Ubuntu下安装软件,更是没有技巧,只需要在联网的情况下使用apt-get inatll 即可。在决定安装MySQL之前,要先确定系统是否已经安装MySQL。
--------------------------------------分割线 --------------------------------------
Ubuntu 14.04下安装MySQL
《MySQL权威指南(原书第2版)》清晰中文扫描版 PDF
Ubuntu 14.04 LTS 安装 LNMP Nginx\PHP5 (PHP-FPM)\MySQL
Ubuntu 14.04下搭建MySQL主从服务器
Ubuntu 12.04 LTS 构建高可用分布式 MySQL 集群
Ubuntu 12.04下源代码安装MySQL5.6以及Python-MySQLdb
MySQL-5.5.38通用二进制安装
--------------------------------------分割线 --------------------------------------
本文测试版本:Ubuntu 14.04
Hadoop@master:~$ netstat -tap | grep mysql
(并非所有进程都能被检测到,所有非本用户的进程信息将不会显示,如果想看到所有信息,则必须切换到 root 用户)
由此可以看出系统中并没有安装mysql,执行以下命令进行安装。
hadoop@master:~$ sudo apt-get install mysql-server
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
将会安装下列额外的软件包:
libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18
libterm-readkey-perl mysql-client-5.5 mysql-common mysql-server-5.5
mysql-server-core-5.5
建议安装的软件包:
libmldbm-perl libnet-daemon-perl libplrpc-perl libsql-statement-perl
libipc-sharedcache-perl tinyca mailx
下列【新】软件包将被安装:
libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18
libterm-readkey-perl mysql-client-5.5 mysql-common mysql-server
mysql-server-5.5 mysql-server-core-5.5
升级了 0 个软件包,新安装了 10 个软件包,要卸载 0 个软件包,有 158 个软件包未被升级。
需要下载 8,343 kB 的软件包。
解压缩后会消耗掉 86.8 MB 的额外空间。
您希望继续执行吗? [Y/n]
输入Y进入到安装界面,在安装过程中,会弹出一个界面要求输入mysql的root的密码,,这里一定输入,省得安装后再设密码了。
再次输入密码:
获取:1 trusty-updates/main mysql-common all 5.5.38-0ubuntu0.14.04.1 [14.1 kB]
获取:2 trusty-updates/main libmysqlclient18 i386 5.5.38-0ubuntu0.14.04.1 [592 kB]
获取:3 trusty/main libdbi-perl i386 1.630-1 [881 kB]
获取:4 trusty/main libdbd-mysql-perl i386 4.025-1 [99.6 kB]
获取:5 trusty/main libterm-readkey-perl i386 2.31-1 [27.2 kB]
获取:6 trusty-updates/main mysql-client-5.5 i386 5.5.38-0ubuntu0.14.04.1 [1,433 kB]
获取:7 trusty-updates/main mysql-server-core-5.5 i386 5.5.38-0ubuntu0.14.04.1 [3,135 kB]
获取:8 trusty-updates/main mysql-server-5.5 i386 5.5.38-0ubuntu0.14.04.1 [2,082 kB]
获取:9 trusty/main libhtml-template-perl all 2.95-1 [65.5 kB]
获取:10 trusty-updates/main mysql-server all 5.5.38-0ubuntu0.14.04.1 [12.4 kB]
下载 8,343 kB,耗时 49秒 (168 kB/s)
正在预设定软件包 ...
Selecting previously unselected package mysql-common.
(正在读取数据库 ... 系统当前共安装有 212184 个文件和目录。)
Preparing to unpack .../mysql-common_5.5.38-0ubuntu0.14.04.1_all.deb ...
Unpacking mysql-common (5.5.38-0ubuntu0.14.04.1) ...
Selecting previously unselected package libmysqlclient18:i386.
Preparing to unpack .../libmysqlclient18_5.5.38-0ubuntu0.14.04.1_i386.deb ...
Unpacking libmysqlclient18:i386 (5.5.38-0ubuntu0.14.04.1) ...
Selecting previously unselected package libdbi-perl.
Preparing to unpack .../libdbi-perl_1.630-1_i386.deb ...
Unpacking libdbi-perl (1.630-1) ...
Selecting previously unselected package libdbd-mysql-perl.
Preparing to unpack .../libdbd-mysql-perl_4.025-1_i386.deb ...
Unpacking libdbd-mysql-perl (4.025-1) ...
Selecting previously unselected package libterm-readkey-perl.
Preparing to unpack .../libterm-readkey-perl_2.31-1_i386.deb ...
Unpacking libterm-readkey-perl (2.31-1) ...
Selecting previously unselected package mysql-client-5.5.
Preparing to unpack .../mysql-client-5.5_5.5.38-0ubuntu0.14.04.1_i386.deb ...
Unpacking mysql-client-5.5 (5.5.38-0ubuntu0.14.04.1) ...
Selecting previously unselected package mysql-server-core-5.5.
Preparing to unpack .../mysql-server-core-5.5_5.5.38-0ubuntu0.14.04.1_i386.deb ...
Unpacking mysql-server-core-5.5 (5.5.38-0ubuntu0.14.04.1) ...
Processing triggers for man-db (2.6.7.1-1) ...
正在设置 mysql-common (5.5.38-0ubuntu0.14.04.1) ...
Selecting previously unselected package mysql-server-5.5.
(正在读取数据库 ... 系统当前共安装有 212532 个文件和目录。)
Preparing to unpack .../mysql-server-5.5_5.5.38-0ubuntu0.14.04.1_i386.deb ...
Unpacking mysql-server-5.5 (5.5.38-0ubuntu0.14.04.1) ...
Selecting previously unselected package libhtml-template-perl.
Preparing to unpack .../libhtml-template-perl_2.95-1_all.deb ...
Unpacking libhtml-template-perl (2.95-1) ...
Selecting previously unselected package mysql-server.
Preparing to unpack .../mysql-server_5.5.38-0ubuntu0.14.04.1_all.deb ...
Unpacking mysql-server (5.5.38-0ubuntu0.14.04.1) ...
Processing triggers for ureadahead (0.100.0-16) ...
ureadahead will be reprofiled on next reboot
Processing triggers for man-db (2.6.7.1-1) ...
正在设置 libmysqlclient18:i386 (5.5.38-0ubuntu0.14.04.1) ...
正在设置 libdbi-perl (1.630-1) ...
正在设置 libdbd-mysql-perl (4.025-1) ...
正在设置 libterm-readkey-perl (2.31-1) ...
正在设置 mysql-client-5.5 (5.5.38-0ubuntu0.14.04.1) ...
正在设置 mysql-server-core-5.5 (5.5.38-0ubuntu0.14.04.1) ...
正在设置 mysql-server-5.5 (5.5.38-0ubuntu0.14.04.1) ...
16:29:54 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
mysql start/running, process 31215
正在设置 libhtml-template-perl (2.95-1) ...
Processing triggers for ureadahead (0.100.0-16) ...
正在设置 mysql-server (5.5.38-0ubuntu0.14.04.1) ...
Processing triggers for libc-bin (2.19-0ubuntu6.1) ...
MySQL Server安装过程
mysql安装完成后,我们可以通过netstat -tap|grep mysql来查看系统是否已经有了mysql服务。
出现上面的信息,说明我们安装mysql成功。
执行以下命令可以查看MySQL的版本:
hadoop@master:~$ mysql -V
mysql Ver 14.14 Distrib 5.5.38, for debian-linux-gnu (i686) using readline 6.3
更多详情见请继续阅读下一页的精彩内容: