我使用的是amazonlinux,我使用rpm包安装了mysql社区服务器和mysql communitu客户端。
rpm -ivh mysql-community-common-5.5.62-2.el7.x86_64.rpm
rpm -ivh mysql-community-libs-5.5.62-2.el7.x86_64.rpm
rpm -ivh mysql-community-client-5.5.62-2.el7.x86_64.rpm
rpm -ivh mysql-community-server-5.5.62-2.el7.x86_64.rpm
mysql版本
bash-4.2# /usr/bin/mysql --version
/usr/bin/mysql Ver 14.14 Distrib 5.5.62, for Linux (x86_64) using readline 5.1
但是我无法启动mysql服务器或设置密码。mysql.sock文件也丢失。当我尝试启动mysql服务器时,出现了以下错误。
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
我按照相同的步骤安装mysql5.1.39
rpm -ivh MySQL-server-5.1.39-0.glibc23.x86_64.rpm
rpm -ivh MySQL-client-5.1.39-0.glibc23.x86_64.rpm
启动mysql服务器后,“/etc/init.d/mysql start”无法连接到本地mysql服务器错误得到解决。
但是对于MySQL5.5版本,我在这个目录/etc/init.d中找不到mysql文件/
我试图启动服务器如下,并得到一个不同的错误。
bash-4.2# sudo /usr/sbin/mysqld start
181214 19:35:07 [Note] /usr/sbin/mysqld (mysqld 5.5.62) starting as process 135 ...
181214 19:35:07 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
181214 19:35:07 [ERROR] Aborting
181214 19:35:07 [Note] /usr/sbin/mysqld: Shutdown complete
bash-4.2# sudo systemctl start mysqld
Failed to get D-Bus connection: Operation not permitted
bash-4.2#
暂无答案!
目前还没有任何答案,快来回答吧!