Hot answers tagged mysql
Your command: count=$(mysql -uroot -proot csv_imports -e "select count(user_Id) from test_data where user_Id=\"12345\";") Will probably fetch something like: +---------------+ | count(userid) | +---------------+ | 5 | +---------------+ Because that is the default output of a mysql query. To suppress the header and column names, you should ...
Simple syntax to restore database is mysql -uusername -hhostip/dns -ppassword databasename < dumpfile.sql This should work fine.
I suspect it is a corrupt /opt/lampp/var/mysql/aria_log_control from the logs. Please move out of the way (do not delete it just in case), and restart mysql. If it works, please delete the old copy.
I believe you have to give the mysql user read and execute permissions to /var/log before it can access /var/log/mysql. I just tested this on RHEL7.1 and confirmed the same issue. This is precisely as @prem suggested in the comments.
If you can ssh to server02 from the server01 you could try ssh -t -L server02:4201 server01 'ssh -N -L server03:4201 server02' it will chain connection localhost:4201 -> server02:4201 -> server03:4201 just connects locally to port 4201 on the mac Better use key authentication and ssh-agent to avoid typing passwords.
Only top voted, non community-wiki answers of a minimum length are eligible