Solved

I have to start MySQL. How?

Posted on 2014-10-13
12
198 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
  • 6
  • 5
12 Comments
 
LVL 34

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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
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 34

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 34

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 34

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 34

Expert Comment

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

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
Introduction In this article, I will by showing a nice little trick for MySQL similar to that of my previous EE Article for SQLite (http://www.sqlite.org/), A SQLite Tidbit: Quick Numbers Table Generation (http://www.experts-exchange.com/A_3570.htm…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

808 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