
01-26-2006, 08:41 PM
|
|
Junior Guru Wannabe
|
|
Join Date: Jun 2004
Posts: 89
|
|
Can someone please give me step by step details on downloading the my.cnf file.
I dont need any values. What I need is how to get the file on my computer so I can edit it and then upload it again. I see a lot of sites offering info on how to configure the values within the file...but non tell you how to download the file. Thats like telling me what type of seats I need in my car without telling me how to open the doors!  When I login to my site via SSH I can see the file...but don't know how to get it downloaded on my computer to edit it.
Thanks
|

01-26-2006, 08:53 PM
|
|
Too smart for her own good.
|
|
Join Date: Feb 2004
Location: Your Screen
Posts: 3,998
|
|
It is not a file that you download and then upload again. Root-level files get changed via SSH.
There are two editors that are pre-installed on your server that you can use while you are SSH'ed in. They are called "nano" and "vi". Of the two, nano will be easier to use, because its key combinations (menu) are provided right on the screen as you work.
To edit a file, first make a back-up.
cp /etc/my.cnf /etc/my.cnf.old
Now open it in nano:
nano /etc/my.cnf
Use the arrows to navigate around. Or: - CTRL-W brings up a search box, type in the value you are looking for and hit enter.
- CTRL-V is page down
- CTRL-Y is page up
- CTRL-K deletes the line the cursor is on
- CTRL-X to exit... if you want to save the changes you have made, hit Y. If you don't want to save your changes (like if you made a dastardly mistake, which I do often) hit N. You can always go back into nano again and re-try at making the changes correctly.
Once you are done,
/etc/rc.d/init.d/mysql restart
Your changes will now take effect.
 Bailey
__________________
Let's Connect on Twitter! @thatsmsgeek2u || Fighting mediocrity one thread at a time.
|

01-26-2006, 08:57 PM
|
|
Too smart for her own good.
|
|
Join Date: Feb 2004
Location: Your Screen
Posts: 3,998
|
|
Oh... if through all of this you have completely broken MySQL, just restore my.cnf using your handy backup:
cp /etc/my.cnf.old /etc/my.cnf
The server will ask you if you want to overwrite the existing copy of /etc/my.cnf? y for yes.
Then type,
/etc/rc.d/init.d/mysql restart
and MySQL will be happily restored to its pre-edited settings again.
 Bailey
__________________
Let's Connect on Twitter! @thatsmsgeek2u || Fighting mediocrity one thread at a time.
|

01-26-2006, 09:01 PM
|
|
Junior Guru Wannabe
|
|
Join Date: Jun 2004
Posts: 89
|
|
Thank you very much
After doing the changes can I also do a mysql restart with my whm to apply the changes?...it's much easier for me.
Last edited by registercheaper; 01-26-2006 at 09:06 PM.
|

01-26-2006, 09:07 PM
|
|
Performance Specialist
|
|
Join Date: Dec 2004
Location: New York, NY
Posts: 10,340
|
|
Quote:
|
Originally Posted by registercheaper
Thank you very much
After doing the changes can I also do a mysql restart with my whm to apply the changes?...it's much easier for me.
|
You may do that too yes, but there is really no harm in doing it in SSH.
__________________
MediaLayer, LLC - Lightning fast web hosting since 2005. Ask about our new pure SSD storage platform!
›› First and leading provider of LiteSpeed based hosting combined with enterprise grade hardware.
›› Free Account Migrations, Custom Solutions, and Servers in US, EU, and Asia
›› Our Application Hosting plans outperform the typical VPS. Ask us about special offers on yearly plans!
|

01-27-2006, 05:10 AM
|
|
Junior Guru Wannabe
|
|
Join Date: Jun 2004
Posts: 89
|
|
Once I find the folder how do I copy and paste the contents? I have seen others copy and paste the my.cnf file on other threads.
|

01-27-2006, 06:49 AM
|
|
WHT Addict
|
|
Join Date: Jan 2006
Location: Somewhere in USA
Posts: 110
|
|
Hey there... Copy and paste it's easy...depends from where do you want to copy...if you have found on the web a configuration for mysql...you can easy open the my.cnf file with nano..or pico or vim...and delete all that is inside the my.cnf file and then go and copy the settings and go into your shell again and right-click, and this should be all...or of course right-click and paste...depends what shell are you using...
I hope this is what you wanted to know...
If not give a reply and i will try to resend you the answer you are looking for...
Hope this will help you...
Go and paste that ***... 
|

01-27-2006, 07:13 AM
|
|
Junior Guru Wannabe
|
|
Join Date: Jun 2004
Posts: 89
|
|
Thanks for your reply,
Im using nano. I would like to copy my.cnf file and show it to someone. When I hit the copy command it does not copy. I have seen numerous postings with people displaying their my.cnf files of other log files and I just wanted to know how to copy and paste my own logs files for others to examine.
Example: how did this person post their file
http://www.webhostingtalk.com/showth...ghlight=my.cnf
|

01-27-2006, 07:23 AM
|
|
WHT Addict
|
|
Join Date: Jan 2006
Location: Somewhere in USA
Posts: 110
|
|
On linux shell , the copy comand may differ, so depending on your SSh client, you could try to "nano my.cnf" and than to select the with the mouse what it is in there...and go on your pc and click paste into a notepad file...
In the most cases selecting under linux shells will automaticly mean Copy...
Try this and let us know...Also if it is not working try to tell us what ssh client are you using..
Bye!
|

01-27-2006, 10:16 AM
|
|
Too smart for her own good.
|
|
Join Date: Feb 2004
Location: Your Screen
Posts: 3,998
|
|
You can print out the contents of my.cnf by typing, in SSH,
cat /etc/my.cnf
Then you are not opening the file and risking making changes or deleting part of it. This is just an uneditable printout of the file.
For me, I just scroll up in the terminal window, select the text I want to copy (like with any web browser? click-drag the mouse?) and hit ctrl-c to copy. Then I paste it into the forum window, text editor, whatever.
 Bailey
__________________
Let's Connect on Twitter! @thatsmsgeek2u || Fighting mediocrity one thread at a time.
|

02-09-2006, 05:50 AM
|
|
WHT Addict
|
|
Join Date: Aug 2002
Posts: 174
|
|
I also need to edit my.cnf file.
How do I know if I have nano, pico or vi installed on my server?
Thanks.
__________________
..
|

02-09-2006, 08:21 AM
|
|
Junior Guru Wannabe
|
|
Join Date: Jan 2006
Location: Europe
Posts: 49
|
|
"vi" and "ee" is default editors for FreeBSD, on linux you can try to use pico or something like that. On freebsd nano can be installed from ports collection or via pkg_add command.
from ports
Code:
cd /
cd /usr/ports/editors/nano
make istall clean
after that just tipe "rehash"
also You can use "pkg_add -r nano"
firenic# pkg_add -r nano
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-5.4-release/Latest/nano.tbz...
after that just rehash :)
cheers
|

02-10-2006, 01:28 AM
|
|
Carpe Diem
|
|
Join Date: Jul 2003
Location: Connecticut
Posts: 3,038
|
|
And that's why companies like Cpanel are rich now
Point and click baby!! 
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
| Postbit Selector |
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
| Login: |
|
|
| Advertisement: |
|
|
| Web Hosting News: |
|
|
|