dvdtalk
Fri 9th Feb '01, 7:56pm
While my problem isn't solved, I do want to give back to this forum and some of the people who have given freely of their help.
Here are some useful nuggets I've gotten from posts here. (We're running on Linux so the commands are based on that). Some of this may be basic basic basic stuff, but much of it has been new to me.
1) How to start and stop MySQL
2 ways to do this, best way is to go into your mysql folder (for us this is /usr/local/mysql) and find the file mysql.server
to start mysql do ./mysql.server start
to stop mysql do ./mysql.server stop
*if you have a ton of mysql processes running you may have to do the stop command more than once
you can also go into the bin folder of mysql (for us /usr/local/mysql/bin) and run
./mysqladmin shutdown
I think for us we had to do it as
./mysqladmin -uusername -ppassword shutdown
2) Backing up MySQL
in your MySQL bin directory (for us /usr/local/mysql/bin) run mysqldump:
./mysqldump -uusername -ppassword databasename > /home/root/nameofdumpfile.txt
pick the path that you want to dump the file into.
3) Repairing MySQL Database
First thing you need to do is to backup your database! Then be sure that MySQL is stopped before you do your back up.
For us on the latest version of MySQL to scan your file for errors in your MySQL bin directory (for us /usr/local/mysql/bin) use myisamchk
TO Scan For Errors:
./myisamchk /usr/local/mysql/data/datbasename/*.MIY
To Scan for Errors and Repair Them:
./myisamchk -r /usr/local/mysql/data/datbasename/*.MIY
4Other Tips:
To look at your load on your server you can do one of the following commands:
top (which will show your server load, memory and each process)
top -i (which will only show server load, memory, and active processes - wil ignore idle and zombie processes)
w (shows who's logged in, and what they're doing and load)
uptime (time server has been up and the current load)
free (shows the use of memory on the server, how much is there, what's being used and how much of what's being used is in buffers/cache)
free -b (show same info in bytes)
free -k (show it in K)
free -m (Show it in MB)
Also if you don't know what processor(s) you have you can do a: cat /proc/cpuinfo
Hopefully this list will be of help to someone out there.
Geoff Kleinman
http://www.DVDTalk.com
Here are some useful nuggets I've gotten from posts here. (We're running on Linux so the commands are based on that). Some of this may be basic basic basic stuff, but much of it has been new to me.
1) How to start and stop MySQL
2 ways to do this, best way is to go into your mysql folder (for us this is /usr/local/mysql) and find the file mysql.server
to start mysql do ./mysql.server start
to stop mysql do ./mysql.server stop
*if you have a ton of mysql processes running you may have to do the stop command more than once
you can also go into the bin folder of mysql (for us /usr/local/mysql/bin) and run
./mysqladmin shutdown
I think for us we had to do it as
./mysqladmin -uusername -ppassword shutdown
2) Backing up MySQL
in your MySQL bin directory (for us /usr/local/mysql/bin) run mysqldump:
./mysqldump -uusername -ppassword databasename > /home/root/nameofdumpfile.txt
pick the path that you want to dump the file into.
3) Repairing MySQL Database
First thing you need to do is to backup your database! Then be sure that MySQL is stopped before you do your back up.
For us on the latest version of MySQL to scan your file for errors in your MySQL bin directory (for us /usr/local/mysql/bin) use myisamchk
TO Scan For Errors:
./myisamchk /usr/local/mysql/data/datbasename/*.MIY
To Scan for Errors and Repair Them:
./myisamchk -r /usr/local/mysql/data/datbasename/*.MIY
4Other Tips:
To look at your load on your server you can do one of the following commands:
top (which will show your server load, memory and each process)
top -i (which will only show server load, memory, and active processes - wil ignore idle and zombie processes)
w (shows who's logged in, and what they're doing and load)
uptime (time server has been up and the current load)
free (shows the use of memory on the server, how much is there, what's being used and how much of what's being used is in buffers/cache)
free -b (show same info in bytes)
free -k (show it in K)
free -m (Show it in MB)
Also if you don't know what processor(s) you have you can do a: cat /proc/cpuinfo
Hopefully this list will be of help to someone out there.
Geoff Kleinman
http://www.DVDTalk.com