General :: Shell Script To Check Whether Mysql Server Is Running Or Not
Apr 27, 2009
from nmap localhost | grep mysql command i will come to know whether mysql server is running or not.my problem is i want to test whether mysql server is running or not in shell script and if it is running i need to tell the user to stop the server to run the shell script.
View 3 Replies
ADVERTISEMENT
Sep 10, 2010
I need to add something to an existing shell script that will check whether a remote server is up or not.basically (but I can't figure it out) :-
if [ -the server to check- ] ; then
echo "Server is Up"
else
[code]....
View 12 Replies
View Related
Nov 15, 2009
I have just installed joomla and proceeded to do the web install. Got the interface up and running and its now complaining it does not see the mysql server running. I do in fact have it running. Veryfied it with mysql command on command line and it complained with missing attributes.
I read a thread that it needs php-mysql installed. So went to proceed to install it. Well, I did not have that and went to install it. Verified it. Package mysql-server-5.0.77-3.el5.i386 already installed and latest version
I then did a service mysql reset.
Checked back at the joomla web install interface and still, it says there is no mysql support! What is next? Im running centos OS. Also, I am running LAMP
View 3 Replies
View Related
Aug 7, 2010
How do I create a new mysql user and a mysql database at the shell prompt?
View 1 Replies
View Related
Oct 4, 2010
I have a RHEL5 machine having mysql5.0.22 is installed in it. i also installed java through "jdk-1_5_0_19-linux-i586.bin" package, and its version is 1.5.0_19. I am trying to check if any JDBC driver for Mysql Server is installed on my system . How can I do this? If any driver is already installed How can I get the file path for those driver files? is it comes along with jdk packages? As i am not a programmer, and does't know more about jdbc.
View 1 Replies
View Related
May 23, 2010
My server is using MySQl mysql-5.0.77-3.el5 on Centos 5.4.When I check mysql log at /var/log/mysqld.log,it displays warning Quote:
100524 11:46:21 mysqld started
100524 11:46:21 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
100524 11:46:21 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
[code]....
View 7 Replies
View Related
Jun 2, 2010
i am using liferay5.2(mysql included in the download pack) on fedora. while liferay is working fine but i cannot connect to mysql.i am getting the error
[
[root@localhost ~]# ln -s /var/lib/mysql/mysql.sock /tmp
[root@localhost ~]# /etc/init.d/mysqld start
Timeout error occurred trying to start MySQL Daemon.
[code]....
i didnt find the mysql.sock file in the location /var/lib/mysql/mysql.sock. i cannot find the portal-ext.properties file also to make intial settings.
View 9 Replies
View Related
Oct 27, 2010
I'm running zoneminder on Ubuntu 9.10 Even with a UPS the power quite often fails enough that I need to drive over bring home the computer and run ( mysqlcheck --all-databases --auto-repair -p ) Then enter my user PW then my Mysql PW. Both are the same. How ever if it were possible to create a script that could run at start up I could get anyone to cycle the power and let it fix it's self.
View 6 Replies
View Related
Feb 12, 2011
i am trying to write a shell script which will check my IP and domain name in rbl and inform me if it is listed.
View 4 Replies
View Related
Oct 2, 2010
Is there any reason for the mysql user to need bash shell?
From /etc/passwd:
Code:
mysql:x:100:103:MySQL server:/var/lib/mysql:/bin/bash
Will anything break if I change that to /bin/false?
View 2 Replies
View Related
Jul 6, 2010
1-what is the shell command which allows me to know how many opened sessions on a mysql server?
2- what are the important points we can manage in a mysql server?
View 2 Replies
View Related
Jan 17, 2011
I am new to scripting, would like to have a script that tests whether a directory exists on remote host & display the message accordingly. The remote hostname can be provided by means of file containing list of hostnames. Can use rsh for connecting to remote host.I tried with couple of scripts by searching google but didn't get desired result. Please help me, below is my efforts, $file contains list of hostnames.
View 10 Replies
View Related
Jun 19, 2010
i want to know how can i change the owner of the mysql data base with shell commands.
View 3 Replies
View Related
Feb 20, 2011
I'm having a hard time to access MySQL from the local or remote shell.
If I try to access MySQL, using mysql -u root -pxxxx I get the error 1045 Access denied...
MySQL is running and I can access it, using phpmyadmin.
There must be something blocking shell access. Can anybody confirm and tell me how to check/configure for shell access?
I'm using ca preconfigured CenOS from PBX in a flash and it seems they did some security settings - but I can't find any further information.
I know I should probably post there, but the Mods didn't activate my account yet. And you know how it is if you try to figure something out. You won't stop.
View 1 Replies
View Related
Sep 27, 2010
I am using this command (inside a bash script) to check if mailserver is running correctly (port 25)
# echo | telnet localhost 25 | grep "Connected to "
If it does not respond I receive an email alter.
It works good , but sometime it NEVER respond (neither after 1 hour) , so I receive no notification . DO you know alternative command to the command above ?
View 1 Replies
View Related
Apr 12, 2010
I Bought A New Centos VPS,Not Much Details Are Provided About Setup Etc..I Wanted To Check If FTP Service Is Running Or Not And Which FTP Daemon Is Running.(Is There Any FTP Daemon Pre-Installed With Centos)
View 6 Replies
View Related
Mar 13, 2010
When I installed CentOS v5, I declined the FTP server that cane with it because I have used and prefer ProFTPd. Now I'm not so sure what's running. How do I check what FTP is installed and / or running? ALSO there seem to be TWO ProFTPd conf files, one at:
[code]...
They have different content. Which is the one that is being used?
View 3 Replies
View Related
Aug 2, 2010
I'm running CentOS 5.5 and have created an init script. The start of the script contains:
# Source function library.
if [ -f /etc/init.d/functions ]; then
. /etc/init.d/functions
fi
The start bit works fine, but I'm having problems with the status and stop part:
status)
echo -n "Status of script: "
status "/bin/sh /path/to/script.sh"
RETVAL=$?
echo
;;
In PS AUX the command appears as "/bin/sh /path/to/script.sh" and I can see the PID. But when I run:
./my_init_script status
It says the script is not running. Should I be using the /bin/sh bit, or just the full script path, or just the script filename?
The stop part of the init script utilises "killproc". Again what command should I be using to successfully kill all occurrances of the script?
View 1 Replies
View Related
Apr 16, 2010
i have apache and mysql running, i can access my web server by visiting localhost on port 80 but for some reason when it doesnt work when i try using my ISP provided IP address... (it used to work).. i have my router setup with a DMZ on my LAN IP (my computers IP, this is the computer in my home network that serving with apache).. i also cant seem to shut down my mysql server (theres an update ive been trying to get) even when i use sudo...
View 5 Replies
View Related
Jun 27, 2009
quick guidance on running a bash script using Perl. The script is calledarchive_web.sh.The regular script I have and use now (archive.sh) creates an archive directory (uses the current date as the dir name) and moves all existing files there.The script is cronned to run every day before midnight. I'd like to be able to run this "archiving script"manually, from the web, at my own discretion, rather than necessarily wait till midnight (but want it to run then, too, in case any new files present themselves in the directory).These shell scripts sit in an .htaccessed directory. Talk about making up verbs all over the place.
View 1 Replies
View Related
May 1, 2010
i have a input text file contain 10 rpms and they are old versions i need a shell script to check if these rpms is installed or not and if the newer version is installed and i need all the results in one output text file contain every rpm and its condition ( the same) or (new )or( not installed)
View 3 Replies
View Related
Apr 7, 2010
How do I obtain information about the running x-server from a remote shell session? I want to know things like resolution, color depth, etc. My xorg.conf is basically empty. The only thing I can think of doing is to read the Xorg.0.log file which seems inefficient.
I thought that 'xrandr' displayed some text output but that behavior has changed (?). It seems to require an X display. Is there another way? Something I could incorporate into a shell script? (This is Fedora but that shouldn't really matter)
View 1 Replies
View Related
Aug 4, 2010
there is a folder. Its empty. When every I drag a new file and put into it it echo out "there is file in there" and keep monitoring the folder. How can I do it?
View 7 Replies
View Related
Jul 22, 2011
I have 200+ mysql database dump in tar.gz format. Restoring all of them one by one is very time consuming. Is there any way so I can restore all these database in a single transaction.
View 1 Replies
View Related
Jun 17, 2011
I have two linux servers, they are backup together.
1. Server 1 have 3 files with name: file1, file2, file3 in the path: /etc/sysconfig/network-script/.
2. Server 2 have 3 files with name and path are the same as server 1.
- How to make a script to copy 3 files at server1 to overwrite on server2. But before overwrite, this script will check and compare the last modified date of these 3 files(on server1 and server2). if the modified date of file1, file2 or file3 on server1 is newer than 3 files on server2 then overwrite process will do, if not, will do nothing.
- see my script as below: it works find now but just overwrite. not check last modified date.
View 1 Replies
View Related
Jan 29, 2010
I run a script manually like/usr/lib/openoffice.org/program/soffice and when I run
:ps -ef|grep openoffice
I get the following,
root 700 1 0 10:45 ? 00:00:00 /bin/sh /usr/lib/openoffice.org/program/soffice -calc
My question is how to check whether this script is running or not (It can be checked every 10 minutes) and how to make it as a service. (I don't have root access to put this in rc.local file or somewhere else).
View 2 Replies
View Related
Apr 27, 2011
How do i check if NFS mounts are still up and running?
when i do the command MOUNT , i get some result, but how can i see (or check) if they still up and running? I'm not so familiar with this command, so i hope that someone can guide me
I know that there must be some NFS links mounted, so if one fails, i need to see that with like an echo or something.
View 12 Replies
View Related
Jun 14, 2010
i want to write the script which check the disk space of linux server and send me the disk space details and mail me on my id.
View 2 Replies
View Related
Jun 7, 2011
I think this goes here, but I'm not sure. I decided that XAMPP had been troublesome enough. MySQL never worked. So I decided to instal the LAMP stack offered by YaST. I went about installing it thinking that it would all work. But it seems that I was wrong. So I try to start mysql, and here's what I get:
Code:
the-matrix:~ # mysql start
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2) or
Code:
the-matrix:~ # rcmysql start
Starting service MySQL warning: /var/mysql/mysql.sock didn't appear within 30 seconds
chmod: cannot access `/var/run/mysql/mysqld.pid': No such file or directory
[Code]...
View 6 Replies
View Related
Jun 25, 2010
I have an Ubuntu server in which a file is dumped every hour and a new file for the next hour and the process continues. If there is any problem due to which the creation of file stops then empty files are created every minute till the process is killed & started again. I need help to make a shell script to check if the empty files are being created and then kill the process and start it again.It would be a great help if anyone can help me regarding this.
View 9 Replies
View Related