Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to restart remote MySQL server running on Ubuntu linux?

I'm using Ubuntu 12.04 LTS.

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?

like image 363
PHPFan Avatar asked May 07 '15 12:05

PHPFan


People also ask

How do I restart MySQL server?

First, open the Run window by using the Windows+R keyboard. Second, type services. msc and press Enter : Third, select the MySQL service and click the restart button.


2 Answers

  1. SSH into the machine. Using the proper credentials and ip address, ssh [email protected]. 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

like image 129
Huey Avatar answered Sep 30 '22 10:09

Huey


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

like image 39
Ram Neduri Avatar answered Sep 30 '22 12:09

Ram Neduri