How to set active my database from sleep command - mysql

I'm currently using MySQL Query browser to view the database of my website. Then I encountered this error
error 1049 unknown database 'testajax'
I already dropped this database after using it to test an ajax function. Then my website did not work liked it used to before. Specifically, I cannot INSERT but I can fetch some of the data from my database. I'm a beginner in MySQL, I looked at the tools tab, MySQL Administrator > Server Connections and then I saw this: (Please click to see the image) I found that my database (crb). Is on sleep command. Is this the reason that's why I cannot use my database? If yes, how can I set my database to active to use it again?

Related

Getting an error while using GCP Data Migration Service

I am trying to move my database from a Managed Digital Ocean MYSQL database to GCP Cloud SQL and I thought I'd give the Database Migration Service a try.
Note that I have already tried the One time mysql dump method and it
works fine. I just wanted to try out the Continuous method to minimize down time.
Before even creating the job and running, I try to "Test the job" but I get the following error:
zoho-tracker is the project name and destination-mysql-8 is the destination profile name. This is something else that confuses me, the button says "Go To Source" while the error string shows the destination profile name.
I have tried reading the docs as much as I could and I have checked the prerequisites too. Here are some points of information:
Source MYSQL version is 8.0.20 and destination value I am setting is 8.
The GTID Mode value that I checked using SHOW VARIABLES LIKE 'gtid_mode' is found to be ON.
The server_id value is 2(non zero).
All tables in the relevant DB are innoDB.
The user on the source has the following privileges: SELECT, EXECUTE, RELOAD, SHOW VIEW, REPLICATION CLIENT, REPLICATION SLAVE.
The user/pass/host combo has been verified many times and is correct.
The user was created with 'username'#'%' string and not 'username'#'localhost'.
The user was created with mysql_native_password plugin (although I have tried different users which use the caching_sha2 plugin too).
The connectivity method is IP allowlist and all connections while testing are allowed, so I don't think I need to add the destination IP to the allowlist.
The version_comment variable in the source has a value of 'Source Distribution' not 'Maria DB'.
Any pointers would be appreciated.

joomla database is not responding

In the joomla 3.7 site, everything was running OK. But last night suddenly it has gone totally down, throwing error msg
"Application Instantiation Error: Could not connect to MySQL"
The last operation performed by me was editing a comment as admin. When clicked "SAVE" after editing, the error appeared. The tables were MYIASM.
The check_database or repair_database option in cpanel also do not respond. In phpMyAdmin, I can view the table list but running any query is halting with error
"Lost connection to MySQL server during query
.
Can not back up the database either from cpanel or phomyadmin or mysqldump.
2006 - MySQL server has gone away
But I have another drupal database in the same host. Tt is serving the site and all the above operation work on it without any problem.
The joomla db was in myIASM format. after all errors, I tried to convert the tables to InnoDB. But the ALTER TABLE query also halted in middle. Some tables are Innodb and some are MYIASM now.
Please help me to solve the problem.
Update:
After some checking, I found that the database is throwing error as
already has more than 'max_user_connections' active connections when
trying to connect
But there is no active connection visible in "show processlist"
In your .cfg or .ini,
log_warnings=2 for logging to your error log, including connection failure details.
To determine how many connections are possible,
SHOW GLOBAL VARIABLES LIKE 'max_connections'
and increase by 10% with
max_connections=(newlimit)
both within [mysqld], shutdown, restart
remember SET GLOBAL general_log=1 will track everything MySQL is trying to do for your analysis when you are having troubles.
Remember to turn OFF general_log before you go to lunch (or anywhere).

Jawsdb on heroku, new database post migration, (Mysql2::Error: INSERT command denied to user..?)

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.

Error in configuring MySql workbench - Failed to connect to MySql at localhost

I am new to MySql workbench and never needed to use a lot of DBs before now.
I had an sql script containing all the DB creation, tables, population etc.
So using MySql workbench, I Reversed Engineering Using a Create Script.
Fine, it worked as I can see my tables.
Now I want perform some select over my data and I first need to create a new connection,
So I tried to Creating a MySQL Connection
but when I test the connection, I get the following error: "Failed to connect to MySql server on 127.0.0.1" (10061).
Question: what to use in the below menu (Connection/RemoteManagement/System Profile) or what else could be my problem?
my problem was that I didnt have a db, so I decided to use wampserver which includes everything and it's very simple to use.

MySQL error "No Database Selected"

I am using LAMP on localhost. I can login which uses mysql db, get to the main page (data driven), but when i enter this particular page, its fine, but when i refresh the error is "No Database Selected" then one every page says so.
I restarted the Apache, MySQL server
Browsers FF,IE, Chrome all show the same errors, cleared cache too. At the same time other websites that use the same LAMP server works fine.
Now thats strange
All ideas are welcome.
Are the main pages using mysql_select_db("foo") and this particular one not?
When you are connecting with php, you are not selecting a database (or the select is failing). Is it perhaps using a variable which is not getting properly populated?
Somewhere in the code (PHP) the default database gets reset, probably on a shared database connection. I guess this is a bug in the product you use.
Try going through the code where it connects with database and tries to pull the data. Most of the times there is a configuration file which defines the connection attributes like username, password, database server, port and database to be used also.
for example in phpMyAdmin keeps the information in libraries/Config.class.php file.