I am currently working on migrating my client from AWS to IBM Cloud and I've created a Compose for MySQL instance. I created a dump file from the MySQL instance hosted on AWS and am trying to restore it on Compose for MySQL but I am receiving the following errors:
If I try to restore the structure only, I receive this error: "ERROR 1227 (42000) at line 313: Access denied; you need (at least one of) the SUPER privilege(s) for this operation". When I looked at line 313 in the dump file, it is attempting to create a stored procedure, so apparently my admin account does not have permissions to create stored procedures.
However:
If I try to restore a dump file with structure and data, I receive this error: "the table does not conform to the requirements of an external plugin". This error happens after the first table is created and the INSERT statement is attempting to restore the data to this table.
I am attempting to restore these dump files using MySQL Workbench connected to my Compose for MySQL instance. How can I restore one of these dump files (ideally the one with structure and data) to my Compose for MySQL instance?
Related
When I try to log into MySQL via command line, keeps saying "unknown database 'magento2'"
Any ideas why? Tried as my username and root, getting the same message. If I can't log into mysql, how could I create a database to begin with of that name? So confused.
You should separate between your database application and a logical database. MySQL server is your database application / server.
When you're logging on to MySQL, you're choosing which logical database you would like to work with. A logical database is actually a container of objects such as tables, triggers, views, etc.
So when you see the error unknown database X, it's because you installed the MySQL server, but didn't create the logical database.
To see a list of all logical databases in your server, login to MySQL and run the command show databases;
To create your database, run the command create database magento2;
Now when you login to that database, it should be there and you can start creating your tables and query data from them.
I had the same issue and found that the database name was set in a cnf file. Perhaps you have something similar.
I have got a number of database on a local server. The server was cleaned up (disc cleanup) and mysql service was stopped. I tried to run the service again but it didn't work so I re-installed wampp. After installing it I could connect to mysql server and I see the databases and tables but it generates error 1146 once a table is clicked to open. Is there any way to restore the data from each database?
By the way, I have got a backup from mysql/bin folder which has been taken before installing wampp again.
Here is the error:
try to
Export the db
Delete them
Create them again with same names
Import the data into them
Is it possible to paste some of the exact error not only the code?
I have created a GameCenter type database in sequel pro using root, but for some reason every now and again I get the following errors when connecting to the database and trying to access the tables:
An error occurred while retrieving the information for
table 'Achievement'. Please try again.
MySQL said: Table 'gamecenter2.achievement'
doesn't exist
I have looked around and most people say it is a problem that occurs when copying a database from one place to another however I am not doing that.
In terminal using MySQL the database and tables all show up but I get the same error when trying to access a table's contents:
SHOW COLUMNS FROM Achievement;
ERROR 1146 (42S02): Table 'gamecenter2.achievement' doesn't exist
Any help with this would be really appreciated as running the CREATE TABLES and INSERT over and over is getting quite tiresome!
I've had the same problem recently (and same error message in sequel pro) and have since discovered that it is because certain types of MySQL databases (i.e. those using InnoDB) store the actual data for individual tables outside in a file named "ibdata1" (you can read more on this here: https://dba.stackexchange.com/questions/15531/why-does-innodb-store-all-databases-in-one-file). Thus, if you restore individual folders for your database(s) using time machine, you are actually just restoring empty database architectures without the good stuff inside. If you haven't also restored that "ibdata1" file along with the appropriate "ib_logfile" files it won't be able to find the data. The solution is to make sure you've also restored those files (or a recent good copy).
Do also make sure you stop the mysql service before restoring anything, i.e. "mysql.server stop" from the command line (or "launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist" if you've installed mysql using homebrew).
I have MySQL 5.0 running on a Windows 2003 server. I was trying to drop an archive database when I received this error:
Error dropping database (can't rmdir './database_name/', errno: 17)
There are ARM and ARN files in every directory for every archive database on the server. From what I can tell, these are generated during an optimize.
Is it safe to remove these files manually so that a drop command in mysql will go through normally?
It could mean for example - database directory contains some files that is not belongs to mysql database. For instance .empty file.
I have been working on this all day and now I'm stuck, so hopefully someone out there can help me :)
The challenge.
Migrate data from MS SQL to MySQL.
The MS SQL I received as a bak file, which I restored using SQL server management studio on a PC with Windows 7 Home edition.
I have created a source MySQL database on a webserver, running LAMP.
The solution (maybe)
I'm currently trying to convert the database, initially just one table for testing, using MySQL Workbench with the database->migrate wizard, but now I'm stuck at the Bulk Data Transfer. I would expect this step to create the table in my MySQL database and transfer the data, but that never happens.
For the source I choose Connection Method = ODBC (native)
No problems connecting to the source and destination databases
I choose to keep schema info as table prefix, so imported tables look like: database.dbo_table_name
Migration step succeeds (migrate selected objects & Generate SQL Create Statements)
The Create statements look like this if I don't edit them
CREATE TABLE IF NOT EXISTS 'restored_database_name'.'dbo_table_name' … I think the 'restored_database_name' part causes a permission error. It does if I type this in the SQL tab directly in phpMyAdmin. Therefore I change it to:
CREATE TABLE IF NOT EXISTS 'dbo_table_name' …
Also per default this is part of the SQL:
DROP SCHEMA IF EXISTS 'restored_database_name';
CREATE SCHEMA IF NOT EXISTS 'restored_database_name …
I think this also causes some permission issues, so I commented these out.
In the next step I uncheck the 'Create schema in target RDBMS' since I don't think I want this.
The problem:
Nothing interesting for the next steps, but then at the "Bulk data Transfer" I get this error:
ERROR: 'restored_database_name'. 'dbo_database_name': mysql_stmt_prepare: SELECT command denied to user 'mysql_user_name'#host' for table 'dbo_database_table_name.
Finished copying 0 rows.
I think the error is somehow related to permissions on the destination database. I wonder if it is possible to make sql file, not just with the create table commands, but also with INSERT commands so I could just take the sql and import it using command line or phpmyadmin.
I'm using Workbench 5.2 CE
Any help is appreciated
I've seen that you have made your way into the Workbench's Migration Wizard. Maybe you're just missing something so I suggest you to review this blog so you can verify your steps: How-To: Guide to Database Migration from Microsoft SQL Server using MySQL Workbench.
Unfortunately you can't use the Migration Wizard data copy command line utility to generate the SQL file with all the inserts, but I'm pretty sure you can get this from MS SQL Server Management Studio and it should pretty much work for MySQL without modifications (or with minor modifications).