?
Solved

I have to start MySQL. How?

Posted on 2014-10-13
12
Medium Priority
?
202 Views
Last Modified: 2014-10-14
In the past, when using WAMP, if I had to restart MySQL, I just used the MySQL console, but I don't know how to access my MySQL dynamic as it's sitting on my live server.

How do I get to it?

BTW: I just need to restart MySQL so I can see whether or not my having assigned a new temp directory made a difference.
0
Comment
Question by:brucegust
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
12 Comments
 
LVL 35

Expert Comment

by:Dan Craciun
ID: 40377596
Do you have shell access? If not, contact your host and have them restart it for you.

If you have shell access, on Redhat/Fedora/Centos you use, as root:
service mysqld restart

On Ubuntu
sudo /etc/init.d/mysql restart

HTH,
Dan
0
 

Author Comment

by:brucegust
ID: 40377625
Dan, I've been asked that before and I apologize up front for not knowing something that perhaps I should know, but I don't know what you mean by "shell access."

I'm familiar with using the command line prompt, but I'm like a pig on roller skates, man, I've got no clue.

What is shell access? Is there an app on the server that I access via a URL? I can pop the hood on the server just fine, but I don't know where to look or where to go.

Color me ignorant...
0
 

Author Comment

by:brucegust
ID: 40377635
I was looking at this, but the "shell access" thing prompted me to look for even more detailed instruction...
0
Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

 
LVL 8

Expert Comment

by:Ratnesh Mishra
ID: 40377648
Use putty if its linux put ip of the server and use root and password to get on to shell ?

If the issue is with windows machine ,you can go to services and start the mysql services however you may find mysql services to be a little bit different with either prefix or suffix such as I had installed wordpress so the mysql services was as "wordpressMySql" .
0
 
LVL 35

Expert Comment

by:Dan Craciun
ID: 40377657
OK, let's start from the beginning:
- where is the server located
a. in a room near you (i.e. you have physical access to it) or
b. in a remote location (i.e. you have to use the internet to access the server)?
0
 

Author Comment

by:brucegust
ID: 40377747
Remote location.
0
 

Author Comment

by:brucegust
ID: 40377759
And Dan, just so you know where I'm going with all this because I'm up against a deadline and I've got have some major progress to report today.

I've got a table that's over 36GB. Yes, it's a hoss.

I added all my data prior to it being indexed which is an absolute necessity given the nature of the queries that are being exacted upon it.

I get a "Temporary File Write Failure" every time I try to alter the database which I'm convinced is due to the fact that a temporary copy of the table has to be created as the system attempts to add the index.

I changed my my.cnf file to this:

[mysqld]
tmpdir=/htdocs/twit/temp
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

...believing that the new temporary directory I've assigned will have plenty of room.

But, from what I understand, MySQL has to be restarted in order for the new temp directory to go into affect. And what's really exasperating is I have to sit here for the better part of an hour and twenty minutes to see if anything I've done has had any effect because it takes that long for my interface to process my request, only for it to come back and say it didn't work.

So, that's the big picture....
0
 
LVL 35

Expert Comment

by:Dan Craciun
ID: 40377770
OK, you appear to be on Linux.
How did you change my.cnf? How did you access that file?
0
 

Author Comment

by:brucegust
ID: 40380566
I went out to my server and retrieved it from the etc directory (and I understand that's pronounced "eht-cee," yes?)
0
 
LVL 35

Accepted Solution

by:
Dan Craciun earned 2000 total points
ID: 40380599
Well, then.
If you cannot connect remotely, then you'll need to go out to your server and run the commands locally.

And if you're going anyway, talk with someone with some *nix experience to setup ssh for you. This way, you'll be able to connect remotely using putty or whatever client you prefer.
It's not difficult, but he'll probably need to setup the firewall (iptables?) and router to allow access/NAT.

That's what "shell access" means. A way to access the server remotely and give it commands on the console.
0
 

Author Comment

by:brucegust
ID: 40380662
And you know what, Dan? I got it done! I was able to get with a person who knew the system and the server and was able to do what needed to be done over the phone. It's amazing how quickly things go when you know what you're doing!

Thanks for weighing in! BTW: I've got another question about a query that's running way slow at http://www.experts-exchange.com/Programming/Languages/Scripting/PHP/Q_28537414.html. Feel free to weigh in!

thanks!
0
 
LVL 35

Expert Comment

by:Dan Craciun
ID: 40380712
You're welcome. Glad I could help!
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read on. . .
In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question