How to restart remote MySQL server running on Ubun

2019-03-09 19:23发布

I'm using Ubuntu 12.04 LTS on my machine.

There is on MySQL server situated remotely. I want to restart it.

Can someone please give me in detail step-by-step instructions to restart the MySQL server.

Following are the Database server details of MYSQL I got from phpMyAdmin UI:

Server: Localhost via UNIX socket
Server type: MySQL
Server version: 5.5.40-0ubuntu0.14.04.1 - (Ubuntu)
Protocol version: 10
User: root@localhost
Server charset: UTF-8 Unicode (utf8)

Can someone please help me?

Thanks.

5条回答
劳资没心,怎么记你
2楼-- · 2019-03-09 20:02

What worked for me on an Amazon EC2 server was

sudo service mysqlid restart
查看更多
▲ chillily
3楼-- · 2019-03-09 20:03

other way is:

systemctl restart mysql
查看更多
一纸荒年 Trace。
4楼-- · 2019-03-09 20:10
  1. SSH into the machine. Using the proper credentials and ip address, ssh root@128.0.0.1. This should provide you with shell access to the Ubuntu server.
  2. Restart the mySQL service. sudo service mysql restart should do the job.

If your mySQL service is named something else like mysqld you may have to change the command accordingly or try this: sudo /etc/init.d/mysql restart

查看更多
时光不老,我们不散
5楼-- · 2019-03-09 20:12
sudo service mysql stop;
sudo service mysql start;

If the above process will not work let's check one the given code above you can stop Mysql server and again start server

查看更多
啃猪蹄的小仙女
6楼-- · 2019-03-09 20:23
  • To restart mysql use this command

sudo service mysql restart

Or

sudo restart mysql

Reference

查看更多
登录 后发表回答