[SOLVED] diff of two files not working thru script
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
There is a change in the scenario after running the first trial.
My diff portion that i was trying to achieve is still there and is suppose to be for the user names.
the other portion is decried below.
Server A
1. has my "diff" bash script (diff is the name of my script)
2. we login using mysql user id "xyz" for the mysqldb from the script
3. no mysql db exist here
4. querydb file not generated here so when we look in /tmp we see the other two instead
5. "userlist" generated here
6. "final" file generated here
Server B
1. does not have bash script
2. has mysqldb
3. the file is not created here as well because the mysql user id "xyz" does not have permission on any files and folders on this server
4. userlist file is not generated here
5. final file is not generated here
the querydb file is to be created on Server A. nothing to be created on the database server
CMD="show databases; use metadata; show tables; select * from usernames; select * from personaldata; describe usernames; describe personaldata; select usernames.SNo, usernames.DataTelid, usernames.UName, personaldata.ActiveInactive from usernames, personaldata where usernames.DataTelid=personaldata.DataTelid into outfile '/tmp/querydb';"
the above portion is not creating the file on server B because the new user id we created in the m,yhsql database does not have any sort of permission to create anything in the files or folder of that server B. We want the above query on server A. What modification do i have to do. Where will i insert the ssh command.
The scenario is very confusing but that is the environment i have the restrictions. Nothing is to be created on the Server B and I cannot execute the script on Serve B. Help
PS: this is a purely volunteer site; we answer which qns we want to, when we want to.
If you have serious time issues, you should find a company that offers paid support.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.