3

I'm attempting to open a connection from my Amazon RDS instance to my local dev machine. I added my IP to the security policy in Amazon's panel (read: whitelisted myself in the firewall) and added my user in MySQL:

grant usage on bar.* to [email protected] identified by "foobar";
grant all privileges on bar.* to [email protected];

Assume that 0.0.0.0 is actually my IP.

I then attempt to connect via the command-line MySQL client:

[wk@batman ~]$ mysql --host=1.1.1.1 --user=foo -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MySQL connection id is 66287753 Server version: 5.6.17-log

Copyright (c) 2000, 2014, Oracle, SkySQL Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MySQL [(none)]> show databases;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 66287829
Current database: *** NONE ***
ERROR 1184 (08S01): Aborted connection 66287829 to db: 'unconnected' user: 'foo' host: 0.0.0.0 (init_connect command failed)

I'm not sure what could be causing this error - the results I could find on Google pertained to database replication. Does anyone have any idea what's wrong?

asked Oct 8, 2014 at 18:44

1 Answer 1

5

This is because the user does not have execute grant global, to fix it

GRANT EXECUTE ON *.* TO user_name;
answered Aug 3, 2015 at 18:21
1
  • 1
    I was going nuts over this issue. I have to read about execute now. Thanks Commented Apr 18, 2017 at 9:56

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.