Solved

I have to start MySQL. How?

Posted on 2014-10-13
12
199 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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
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 500 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

726 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