I want to increase the max connections in my MySQL database hosted with AWS through vapor. Currently, it's only 64. I can see that in the vapor platform under databases -> my database but don't see where I can change it within the platform.
What is most confusing for me is that I don't know where to change it. Is it by changing something in Laravel? Running a SQL query, updating something in the AWS console, or changing something in the vapor dashboard?
I have tried to run this in the SQL console
set global max_connections = 1000;
but get back the error:
[42000][1227] Access denied; you need (at least one of) the SUPER or SYSTEM_VARIABLES_ADMIN privilege(s) for this operation
Related
Context: Telephony system (Asterisk) using the MySQL C API to connect to the database to lookup the routing for a call as it comes in. The lookup involves connecting to the database, executing a query, then closing the connection.
Sometimes the very first call in the morning generates the following error:
Access denied for user 'asterisk'#'127.0.0.1' (using password: YES)
Normally this would mean the password was wrong, but that's obviously not the case here, since it uses the same user and password all the time for all the calls. It's as if the system has somehow "gone to sleep" or perhaps a file handle has become stale somewhere, so that the first attempt to the connect to the database fails, but the rest work fine. Also it only happens occasionally, so I'm unable to replicate it - very strange!
I'm using Asterisk 1.8.32 with MySQL 5.5 on Debian 8.7.
It's a bit of a headscratcher, so I would be grateful for any suggestions!
First of all it is very bad idea use 1.8.* tree at current moment becuase of security feature.
Move to 11.* fix this issue.
Also you can do following in my.cnf
interactive_timeout=
Set to any value more then 4 days(weekend)
Other option is reload mysql module by crontab every 3 hrs.
Best option(except upgrade) is move from mysql to res_odbc, which have keepalive option. res_config_mysql considering deprecated, so any new systems should use ODBC.
I am getting this error when executing a GRANT statement on my Aurora DB instance in AWS:
The MySQL server is running with the --read-only option so it cannot execute this statement
My user is not read-only though, so why is this happening?
It turned out to be a silly mistake, but posting it anyway in case anyone else has the problem:
I was accessing the replica instance by mistake - I had copied the endpoint for the replica, and it is read-only apparently. So if you have this problem, verify that you are connecting to the Primary Instance or best of all the DB Cluster endpoint.
Edit: According to #Justin's answer we definitely should use DB Cluster:
You need to connect to the cluster, rather than an instance. This is because instances seem to take a turn to be the readers and writers.
You need to connect to the cluster, rather than an instance. This is because instances seem to take a turn to be the readers and writers.
In my case, I was receiving this error after performing a Blue/Green failover in a Test environment. I was trying to access the Blue database, in order to confirm the process for reverting back to Blue database should that be required later.
Accessing Blue via the cluster address yielded this error, as did attempting to use the direct links to the Blue "reader" and "writer" instances. In the end, I performed a failover of the Blue "reader" and "writer" instances, after which the cluster address was in a working state again.
tl;dr
Try a failover of the "writer".
Deployed a new version of our app on heroku and migrated over database from previous free jawsdb instance. However now every time user signs up gives
(Mysql2::Error: INSERT command denied to user <username for instance
what have i missed
migrated using a dump and re-import using mysql command line. eye balled exported data and it seems to be there (user emails etc)
all config vars look ok (DATABASE_URL is mysql2...)
i can login to the database via the url
I have not had to grant access or anything like that before, anyone come across this?
thanks
Ben
My guess is they disabled your INSERT grant because you have reached your max Storage Capacity for your plan.
To validate this is a permissions problem, log into a MySQL prompt with the user the app is running as, and enter this query:
SHOW GRANTS;
It probably list many, but no INSERT.
See this link. As explained in given link, jawsdb preliminary plan does not give you permission to add a new database. You are provided with one schema with some random name and you have to work with that only.
Check your migration
e.g. Make sure the database name matches.
For me, I got the same error as OP when trying to migrate my data. This was a fresh account with only a 50kb'ish database; nowhere close to the free-plan 5mb limit.
In my SQL export statement, my local database name is being used, however the remote MySQL (ie JawsDB) service auto-generates a db name, which will obviously not be the same. Simply used find-replace to change the database name to match remote; everything works.
My database (mysql) server is hosted on Mochahost.com . I have created an Event on my database, but its not running. I found that the event scheduler is turned off. I queried the following command
SET GLOBAL event_scheduler = ON
but it returned this error
"" #1227 - Access denied; you need (at least one of) the SUPER privilege(s) for this operation
I checked and found that I dont have the privilege option available to create a user with Super privileges
Please help me how to fix this, do I need to contact the host support for this ?
As André said, this is something your host needs to allow (and probably won't in a shared hosting situation). Switching to a dedicated host is probably the only way to get full access to the database.
I'm facing a really weird problem to me.
I'm trying to connect with an user to my mysql 5.5 instance but it keep saying to me that user already exceeded the max_user_connections
ERROR 1226 (42000): User 'xpto' has exceeded the 'max_user_connections' resource (current value: 100)
But,
show processlist
doesn't shows any connection used by that user. I'm pretty sure that user is not using any connection at all.
If i increase the current value to 110 for example i can connect. Then if i lower i can't connect.
EDIT: the global connections usage is 500 and only a few (10/20) are being used.
Any clue?
The server has too many open connections already. A MySQL server can only handle a specific number of open connections before refusing to allow any more, and this limit is shared amongst all users of the server. It's usually set quite high, although it's easily possible for someone to effectively DoS a MySQL server by making lots of connections.
If you got the error message (code 1226) indicates that the entire MySQL server has run out of connection slots - this is the DoS scenario.
Your database must have a user ‘A’ using which you have configured your wordpress blog.
Now the problem is that user ‘A’ has exceeded maximum_questions resource (current value: 40)
Create a new user ‘B’ in your database through your domain control panel and update the same user name you wp-config.php file in
wordpress installation directory.
Now you got the problem fixed in few minutes. It will not disturb the database or the posts you have in your wordpress or phpbb.
Copied from neuronring blog
Are you on MySQL 5, and you've set the user's MAX_USER_CONNECTIONS, and the user recently disconnected?
From MySQL docs:
For the MAX_USER_CONNECTIONS limit, an edge case can occur if the
account currently has open the maximum number of connections permitted
to it: A disconnect followed quickly by a connect can result in an
error (ER_TOO_MANY_USER_CONNECTIONS or ER_USER_LIMIT_REACHED) if the
server has not fully processed the disconnect by the time the connect
occurs. When the server finishes disconnect processing, another
connection will once more be permitted.