Error creating new User in MySQL workbench - mysql

I am getting an error in my SQL workbench when I create a user in my db.
I was given a schema to upload to my db I imported it successfully with no errors in Data import/restore tab. I have the correct userName and password but any time I try and save a user I get this same error.
I've checked the tables > Columns folder and I see the name column is listed. And I've tried dropping the db / schema and starting from scratch a couple times just incase something went wrong with that part.
I am new to using MySQL and working with DB's and schemas in general. So I'm not sure where to look to solve this error. I could use an idea of where this error could be coming from? And any advice on handling it.

Related

The user specified as a definer does not exist - GRANT doesn't fix

After years of no problems with my PHP webapp running MySQL 5.5 on the backend, suddenly today I'm having permissions problems.
Whenever I try to run an INSERT statement (either from PHP or from Workbench or Heidi), I get this error message: The user specified as a definer ('my_user'#'1.2.3.%') does not exist
One symptom is that INSERT statements cannot be executed by my PHP nor by remote clients such as Workbench or Heidi. I have tried various solutions suggested by:
MySQL error 1449: The user specified as a definer does not exist
Error: 1449, "The user specified as a definer ('root'#'localhost') does not exist"
Everything points to running a GRANT statement. I have tried various GRANTs as suggested, but I always get this error:
Access denied for user
It seems like my permissions got corrupted or something. So I created a brand new DB user inside BlueHost control panel on my VPS and gave full privileges. I get the same exact errors on this brand new user.
BlueHost support has no idea what to do.
Some Stack articles say to go mess around with TRIGGERS or STORED PROCS permissions - but I don't have any of these types of objects. Simple INSERT statements cause this error, and perhaps UPDATEs as well, but I'm not sure of that at this moment.
The user has FULL PRIVILEGES, as always.
What else can I try? Is there some way to fix corrupted permissions? I can run SELECT statements with no problems.
I tried connecting to the DB with root (using the same pwd as I use when connecting to WHM), but it didn't like my password or maybe the user in general. I never set up root as a specific user against this DB and I'm not sure that's a good idea. I have always used a specific user created just for this DB. Again, past 5 years no problems at all. The DB has not been upgraded, no DB changes, no user changes, nothing.
I sort of solved it. I ended up creating a new database with a different name, and created a new admin user to go with it. Then I ran my db backup/dump script against it. Everything works perfectly again, with this new DB. The old DB is still jacked.
I'm thinking that permissions got corrupted in the old database.

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.

SQL Linked Server to MySQL database does not work because of missing or´incorrect schema

I want to establish a linked Server Connection from my Office SQL-Server to a web hosted MySQL-database.
Before that I tried to Setup a Connection to a copy of this MySQL-database on localhost.
I created a linked Server in Management Studio pointing to my MySQL-database
it Looks like this:
Testing the Connection was OK, I can see all databases in MySQL.
But when I do a SELECT on one of the tables in a certain database I get an error 7312.
When I generate a select script by SSMS it Comes up with
Select * from [MYSQL_local_ASV].[asvdb]..[descriptions]
not showing any Schema (..) althoug I can connect to the Server.
If I check the table's Schema in MySQL Workbench it Shows the Schema name 'asvdb'. For me it Looks like there is a Schema 'asvdb' with a database called 'asvdb'.
I checked also with [MYSQL_local_ASV].[asvdb].[asvdb].[descriptions].
Same error.
Maybe someone can explain me whats wrong with this and have some example of how to connect to a table in a linked Server.
So, the Problem is, I assumed that database and Schema in mysql are the same, but what does SQL-Server Need to complete the Connection string properly?
If I cannot establish this local connectin I will never get it to a web hosted MySQL-database, so please help me!
Thanks
Michael
use this format for select query
Execute ('select * from tablename')at LinkedServername

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.

Easy PHP and mysql ..php cannot see database on local pc (all works on server)

I have a website written in php and mysql (written by someone else) and I need to alter it- just for your interest it is bridgetjonesart.co.uk. So I thought I would download it to my desktop pc and use easy php and mysql locally to make changes then upload it again.
I seem to have downloaded everything okay. I first just tried to run existing php using Easy Php and got
Warning: mysql_connect(): Access denied for user 'runningc'#'localhost' (using password: YES) in C:\Program Files (x86)\EasyPHP-12.1\www\backup from runningc\public_html\bridgetjonesart.co.uk\mysqlLogin\mysql_connect.php on line 6
Could not connect to database. Error
I have the sql database as a file 'runningc_bjart.sql' in the root directory but I think the php cant see it so I tried to use easy php administration, phpmyadmin and thought perhaps I should import the 'runningc_bjart.sql' file. So I tried and got an error message ...
Error
SQL query:
--
-- Table structure for table `Blog`
--
DROP TABLE IF EXISTS `Blog` ;
MySQL said: Documentation
#1046 - No database selected
I am not sure what to try next, any help would be really appreciated.
Thank you. Bridget
The error messages are VERY clear.
Error #1: You're using the incorrect credentials, or have forgotten to grant rights on your database to the credentials you're using.
Error #2: You've forgotten to set a default database, so MySQL has no idea which database it should be looking in for the table you're trying to drop.
e.g. you need
mysql_select_db('mydatabase');
or change your DROP query to be
DROP TABLE mydatabase.Blog;
With phpmyadmin, create a new database named runningc_bjart and import the file there. Then search in your project for a config file where the db password is set and change it with your local mysql password