How do I start/stop mysql server?

1

How do I start, restart or stop Apache 2 web server & MySQL server under Ubuntu Linux operating systems?

/etc/init.d/apache2 is service script used to start / stop / restart the Apache2 service under Debian or Ubuntu Linux. You need to login as root or use sudo command restart Apache.
sudo -i
Enter your root password
Task: Start Apache 2 Server
# /etc/init.d/apache2 start
or
$ sudo /etc/init.d/apache2 start

Task: Restart Apache 2 Server
# /etc/init.d/apache2 restart
or
$ sudo /etc/init.d/apache2 restart

Task: Stop Apache 2 Server
# /etc/init.d/apache2 stop
or
$ sudo /etc/init.d/apache2 stop

Task: Start MySQL Server
# /etc/init.d/mysql start
or
$ sudo /etc/init.d/mysql start

Task: Restart MySQL Server
# /etc/init.d/mysql restart
or
$ sudo /etc/init.d/mysql restart

Task: Stop MySQL Server
# /etc/init.d/mysql stop
or
$ sudo...

0 0
2

We can start MySQL service from windows command line using the below command.

net start mysql

Command to stop MySql service:

net stop mysql

Disable MySql service:

sc config mysql start= disabled

Command to enable MySql service(to automatically start MySQL service when the system starts up):

sc config mysql start= auto

Command to set the startup type to manual:

sc config mysql start= manual

How to restart MySql service?
There is no direct command to restart a service. You can combine stop and start commands like below.

net stop mysql & net start mysql

Related Posts:

How to connect to MySQL server from windows command line
How to install Mysql in Windows...

0 0
3

Systemd is a new init system and system manager which was implemented/adapted into all the major Linux distributions over the traditional SysV init systems due to lots of issue/improvement has to be on sysVinit systems. All the services is available “/etc/init.d/. If you want to start, stop, restart, enable, reload & status of the service follow the below commands to do it. Either root or sudo Permission needed to run the below commands.

1) To Start MySQL/MariaDB server

Use the below commands to start the MySQL/MariaDB server in Linux.

# For Sysvinit Systems # # service mysql start or # /etc/init.d/mysql start # For Systemd Systems # # systemctl start mariadb.service or # systemctl start mysql.service or # systemctl start mariadb or # systemctl start mysql

2) To Stop MySQL/MariaDB server

Use the below commands to stop the MySQL/MariaDB server in Linux.

# For Sysvinit Systems # # service mysql stop or # /etc/init.d/mysql stop # For Systemd...
0 0
4
How do I install XAMPP?

XAMPP for Windows exists in three different flavors:

Installer:
Probably the easiest way to install XAMPP.

ZIP:
For purists: XAMPP as ordinary ZIP archive.

7zip:
For purists with low bandwidth: XAMPP as 7zip archive.

Note: If you extract the files, there can be false-positives virus warnings.

Using the installer:

The XAMPP control panel for start/stop Apache, MySQL, FileZilla & Mercury or install these server as services.

Installing from ZIP

Unzip the zip archives into the folder of your choice. XAMPP is extracting to the subdirectory "C:\xampp" below the selected target directory. Now start the file "setup_xampp.bat", to adjust the XAMPP configuration to your system.

If you choose a root directory "C:\" as target, you must not start "setup_xampp.bat".

Like with the installer version, you can now use the "XAMPP Control Panel" for additional tasks.

Does XAMPP...
0 0
5

Quick reference card

How to start/stop the MySQL server?

Cloud Server

Each Bitnami stack includes a control script that lets you easily stop, start and restart servers.

The script is located at /opt/bitnami/ctlscript.sh. Call it without any arguments to restart all services:

$ sudo /opt/bitnami/ctlscript.sh start

Or use it to restart a specific service only by passing the service name as argument - for example 'mysql':

$ sudo /opt/bitnami/ctlscript.sh restart mysql

Virtual Machine

Each Bitnami stack includes a control script that lets you easily stop, start and restart servers.

The script is located at /opt/bitnami/ctlscript.sh. Call it without any arguments to restart all services:

$ sudo /opt/bitnami/ctlscript.sh start

Or use it to restart a specific service only by passing the service name as argument - for example 'mysql':

$ sudo /opt/bitnami/ctlscript.sh restart mysql

Native Installer

You can use...

0 0
6

Your first two commands weren't run as root so that is expected behaviour. You need to be root to stop/start mysql.

However:

sudo /etc/init.d/mysql start

should work. Indeed it does, for me:

kojan:~> sudo /etc/init.d/mysql restart [sudo] password for chris: Stopping MySQL database server: mysqld. Starting MySQL database server: mysqld. Checking for corrupt, not cleanly closed and upgrade needing tables..

I used restart rather than start, since it was already running, but the effect is the same. Are you sure you entered your password correctly? :) Have you edited your sudo config at all which would stop this working?

This one..

sudo /etc/init.d/mysql - root -p start

The arguments are wrong. an init.d script only takes start or stop or restart - just one word telling it what to do. You cannot give it multiple arguments as you were trying to do.

Anyway, the short answer is the one you actually got to work, is the recommended way. service is...

0 0
7
Description: I am often find the same quetions from mysql5.0.* version. Now I am using windows 2003 and mysql 5.0.21. when restart windows system, then mysql cant connect." Can't connect to MySQL server on 'localhost' (10061)" . but I am saw mysql service started run. So I have try use dos command E:\MySQL5\bin\mysqld --console. and see some informations. and just mysql can work . but I close the dos command window after, mysql down and cant work again. please see the photo. The questions have been many times and ask for friends help. but mysql still happen the wrong. This is my use --console command after mysql will work. but when i close the command mysql still cant right work. Using Mysql 5.0.21 Plese tell me how i do it. ?! Thanks --Liu. How to repeat: info_yon at...
0 0
8

To restart, start or stop MySQL server from the command line, type the following at the shell prompt…

On Linux start/stop/restart from the command line:

/etc/init.d/mysqld start /etc/init.d/mysqld stop /etc/init.d/mysqld restart

Some Linux flavours offer the service command too

service mysqld start service mysqld stop service mysqld restart

or

service mysql start service mysql stop service mysql restart

On OS X to start/stop/restart MySQL pre 5.7 from the command line:

sudo /usr/local/mysql/support-files/mysql.server start sudo /usr/local/mysql/support-files/mysql.server stop sudo /usr/local/mysql/support-files/mysql.server restart

On OS X Yosemite/El Capitan to start/stop/restart MySQL post 5.7 from the command line:

sudo launchctl load -F /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist sudo launchctl unload -F /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist

...
0 0
9

This section gives a general overview of starting the MySQL server. The following sections provide more specific information for starting the MySQL server from the command line or as a Windows service.

The information here applies primarily if you installed MySQL using the Noinstall version, or if you wish to configure and test MySQL manually rather than with the GUI tools.

The MySQL server will automatically start after using the MySQL Installer, and the MySQL Notifier GUI can be used to start/stop/restart at any time.

The examples in these sections assume that MySQL is installed under the default location of C:\Program Files\MySQL\MySQL Server 5.7. Adjust the path names shown in the examples if you have MySQL installed in a different location.

Clients have two options. They can use TCP/IP, or they can use a named pipe if the server supports named-pipe...

0 0
10

There doesn't appear to be a GUI-based way of doing this unless you're joined to a domain - at least not one I could find anywhere - so I did a bit more digging and I've found an answer that works for our sitaution.

I didn't understand what the string representation meant in the knowledge base article, but doing a bit of digging led me to discover that it's SDDL syntax. Further digging led me to this article by Alun Jones which explains how to get the security descriptor for a service and what each bit means. MS KB914392 has more details.

To append to the service's existing security descriptor, use sc sdshow "Service Name" to get the existing descriptor. If this is a plain old .NET Windows Service - as is the case with ours - the security descriptor should look something like this:

D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOC RRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;CR;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)S:(AU;FA...
0 0
11

In this tutorial we will learn, how to install MySQL Server 5.6 on CentOS 7 / RHEL 7 . In our previous post, we have installed MySQL Server 5.6 on CentOS 6.x/RHEL 7.x.

In CentOS 7/ RHEL 7 , now MariaDB is introduced as a defualt database. Still many Organisations/Company would like to continue with MySQL. Whereas System Admin who earlier worked on MySQL can easily work on MariaDB. MariaDB is a community-developed fork of the MySQL relational database management system.

MariaDB’s lead developer is Michael “Monty” Widenius, the founder of MySQL and Monty Program AB. He had previously sold his company, MySQL AB, to Sun Microsystems for US$1 billion. MariaDB is named after Monty’s younger daughter, Maria. (Reference taken from Wikipedia)

Install MySQL Server 5.6 on CentOS 7 / RHEL 7

Follow the given below steps to install MySQL Server 5.6 .
You must be login with root user in system

Download the Yum Repo package of MySQL Server 5.6

...
0 0
12

In this tutorial we will cover how to start, stop and restart your Apache web server and MySQL db on Ubuntu. Since most Linux servers do not have a graphical user interface installed we will do the steps in a terminal.

In this tutorial I am working with Ubuntu 11.04 Server. If you are running Apache on your Ubuntu desktop these steps will work for you as well.

Apache:

To Start Apache:

sudo /etc/init.d/apache2 start

To Stop Apache:

sudo /etc/init.d/apache2 stop

To Restart Apache:

sudo /etc/init.d/apache restart

MySQL:

To Start MySQL:

sudo start mysql

or

sudo service mysql start

or

(Note: Older Method)

sudo /etc/init.d/mysql start

To Stop MySQL:

sudo stop mysql

or

sudo service mysql stop

or

(Note:...

0 0
13

Devserver

Devserver allows you to fit your needs and allows you to setup a local server with the same characteristics as your production server (if you have one). You can develop locally anywhere (at home, at work, on your laptop...) thanks to the portability of the system.

Features :

Ready-to-use! Download, install and code! Portable (usb key, memory stick, external hard drive...) Fully configurable (port, timezone, extensions...) For beginners, experts Start, stop, restart servers Direct access to files and folders Configuration files, error log, access log... Modular : add applications, versions... ...

Webserver

Webserver is a personal web hosting service. You can host your websites, files, applications on your computer and make them accessible from internet. You can tune your servers as you like and then host your websites, share your applications or demo permanently or for a short period of time (useful for sharing...

0 0
14

So... likely I'm an idiot, but I'm stuck. I just set up a CentOS 7 on Digial Ocean and I can't seem to get the MariaDB/MySQL server running.

Some output

[root@hostname ~]# yum list installed |grep maria mariadb.x86_64 1:5.5.37-1.el7_0 @updates mariadb-libs.x86_64 1:5.5.37-1.el7_0 @updates mariadb-server.x86_64 1:5.5.37-1.el7_0 @updates

So it's installed, can we at least see the client?

[root@hostname ~]# which mysql /bin/mysql

Let's try and start the server, just for fun

[root@hostname ~]# service mysqld start Redirecting to /bin/systemctl start mysqld.service Failed to issue method call: Unit mysqld.service failed to load: No such file or directory. [root@hostname ~]# mysqld -bash: mysqld: command not found [root@hostname ~]# mysql.server start -bash: mysql.server: command not found [root@hostname ~]#

And this is where I get lost. Looking at what is actually installed, there is no server/daemon

...
0 0