作者:瘧59999 | 来源:互联网 | 2023-05-19 00:40
Ihavea512MBVPSatDigitalOceanrunninglatestCentOS7.MySQL5.6wasinstalledusingthesecomm
I have a 512MB VPS at DigitalOcean running latest CentOS 7. MySQL 5.6 was installed using these commands:
我有一个512MB的VPS在DigitalOcean运行最新的CentOS 7。使用这些命令安装了MySQL 5.6:
yum localinstall http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
yum install mysql-community-server
And I am using the following for my my.cnf:
我正在使用以下的my.cnf:
[mysql]
# CLIENT #
port = 3306
socket = /var/lib/mysql/mysql.sock
[mysqld]
# GENERAL #
user = mysql
default-storage-engine = MyISAM
socket = /var/lib/mysql/mysql.sock
pid-file = /var/lib/mysql/mysql.pid
# MyISAM #
key-buffer-size = 128M
myisam-recover = FORCE,BACKUP
# SAFETY #
max-allowed-packet = 16M
max-connect-errors = 1000000
# DATA STORAGE #
datadir = /var/lib/mysql/
# CACHES AND LIMITS #
tmp-table-size = 32M
max-heap-table-size = 32M
query-cache-type = 0
query-cache-size = 0
max-cOnnections= 500
thread-cache-size = 100
open-files-limit = 65535
table-definition-cache = 4096
table-open-cache = 100
# LOGGING #
log-error = /var/lib/mysql/mysql-error.log
log-queries-not-using-indexes = 0
slow-query-log = 0
slow-query-log-file = /var/lib/mysql/mysql-slow.log
When I tried to start MySQL using these command variation, nothing hapens:
当我尝试使用这些命令变体启动MySQL时,没有任何东西是:
[root@server ~]# /etc/init.d/mysql start
-bash: /etc/init.d/mysql: No such file or directory
[root@server ~]# /etc/init.d/mysqld start
-bash: /etc/init.d/mysqld: No such file or directory
So, I tried this method:
所以,我尝试了这个方法:
[root@server ~]# service mysql start
Redirecting to /bin/systemctl start mysql.service
It's been stuck on that message and nothing is happening. I've checked ps aux | grep mysql and I don't see the service running:
它被卡在那个信息上,什么都没有发生。我检查过ps aux | grep mysql我没有看到服务运行:
[root@server ~]# ps aux | grep mysql
root 10688 0.0 0.1 115212 644 ? Ss 20:08 0:00 /bin/bash /usr/bin/mysql-systemd-start post
root 12646 0.0 0.2 132520 1396 pts/0 S+ 20:16 0:00 /bin/systemctl start mysql.service
root 12852 0.0 0.1 112640 960 pts/1 S+ 20:17 0:00 grep --color=auto mysql
Any ideas?
什么好主意吗?
3 个解决方案