I had a DB with some values and for some reasons I had to clear the content of all tables. Then I changed the structure of my tables and I wanted to add the new data to populate my tables.
In order to add the data I do basically like here. Here is what I get, I saw on the internet that it was a problem with my version on Mysql workbench but I never had any problem when I did that previously so I'm kinda not sure where is the real problem.
Ok I get the error, it definitely was not a MySQL version.
Related
I created two tables like this
and I want to change the added data's id so I use
alter table member auto_increment=5;
after this, it couldn't show my member table. It shows
error 2013: lost connection to MySQL server during query.
I thought my table is too big to run, so I changed the limit and the DBMS time out, but it didn't work either. Can someone tell me what's the problem now?
I found the problem. Don't edit your MySQL database when you're connecting it with your Python Flask program. Edit means any CRUD actions.
Okay, so first of all, I am SO sorry if this is an ignorant and stupid question. I have absolutely no knowledge of databases. I have only used them when creating and uploading Wordpress sites, and it works if everything goes without any errors.
So here is my problem:
I've created a Wordpress website on a local server. I've done the usual, exported the database, tried to upload it on the live server, but there seems to be an error.
I get the #1064 error.
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '?' at line 59
Half of the tables do not import on the live server. Here's what I've already tried:
Exporting the tables with the "Enclose export in a transaction" and "Disable foreign key checks" checked.
Exporting in two files with and without the mentioned options checked. This way I got more tables, and the wp_options table got
full instead of empty, but still only 15 tables instead of 23.
I checked to see if the "TYPE" syntax is "ENGINE" and it seems fine to my unknowing eyes.
I am a total ignorant when databases are concerned. I don't know what to check anymore. My guess is that the live server uses MariaDB and it is somehow not compatible with the SQL I'm trying to upload.
I tried to see the line 59, but there is no "?" there, at least not where I'm looking at. It might be that I'm looking at the wrong place, the blond that I am.
Here's the code around the line 59 when database is opened in editor.
--
-- Table structure for table `wp_gg_folders`
--
CREATE TABLE `wp_gg_folders` (
`id` int(11) NOT NULL,
`title` varchar(255) NOT NULL,
`date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
I tried to see the MariaDB's documentation and the possible way to deal with any incompatibility would be to update my MySQL. I have no idea how to do it.
Oh and btw. I already have a working website on this server but with an older version of Wordpress, so if it's an old SQL version, why is it working there?
This turned out to be long... sorry. And thanks in advance!
Edit: I discovered there is a problem with exporting. In the exported file, there are always last third of the tables missing. I have no idea why. Can I somehow get the tables/whole database manually, and not through PhpMyAdmin?
Okay guys and girls, I've found the solution.
The problem was not in any error, it was in exporting the database at the very beginning, therefore, importing showed different kinds of errors each time I tried to import the database.
The query, while exporting would abort the export causing only part of the tables to be exported. By changing the length of the query while doing the export, I solved the problem.
Instead of 50000, I wrote in 1047551.
Here's the article that helped me, with screenshots:
https://wpengine.com/support/exporting-database/
I am using the migration wizard provided by MySQL workbench 6.3 to convert a SQL Server database into a MySQL. I tested the connection between both DBs and they are valid for the migration wizard. Once The migration wizard has completed I am left with 22 migration warnings and they are all the same warning:
Truncated key column length for column 0 to 16
I am having a hard time finding any similarities between the tables that are receiving warnings to narrow down the issue. There are tables with the same types of data that are not receiving these errors.
Here is an example of one of the tables affected by this warning.
Does anyone know what is/what could be causing these migration warnings?
if you need more information/images please let me know.
Migration wizard show this warning when find index that have different length on source and target databases. In fact you should also get index name in that message - ... for column <name> from ..., but it's empty. I guess something goes wrong, but to investigate that I need to reproduce issue on my machine. Please fill bug report on bugs.mysql.com and attach there sample database (you can make it private if you wish). Then paste link here.
Warning doesn't matter. Just remember to rename the schema while migrating I have attached an image for better understanding
https://i.stack.imgur.com/v6PGK.png
I have a problem and not sure if this is possible. My web application has a database and i'm using a mysql workbench and using wamp server.
My web app has a database name healthcare, and if I import again another database with the same tables, etc but addition data. I want the first database to be updated only with new values but not replaced.
Is it possible?
Edit: I searched in the net and other related sources and I manage to set my phpmyadmin "Ignore multiple statement errors". When I import the second database (.sql with same tables but with new data) it does not update the first database but the message is successful. Please help, I'll appreciate any help...
in the past ive searched for tools to do some similar database sync tasks - in my experience ive found that none are free & reliable.
have you tried writing some queries to do this manually?
first thing that comes to mind would be figuring out a key you can use to evaluate each row and determine if you should copy said record from database A to database B.
afterwards you could simply do an INSERT(SELECT)
INSERT INTO healthcare_DESTINATION.table (SELECT * FROM healthcare_SOURCE WHERE some_condition = 1);
obviously this is the simplified version - but i've done something very similar utilizing timestamps (eg only copy rows newer than the newest row in the destination table)
hope this helps
I was importing one table in a MySQL Server when the power went down. After this event I tried to query the table I was importing, but got the error 2013, only when I'm querying this table (the others work just fine).
I have physical access to the server, tried to execute any query from there (tried to SELECT, and even DROP TABLE) but still got the same error.
Does anybody know a solution where I can re-build only the table (without building the whole schema from scratch?)
I'm adding this as an answer rather than having lots of comments underneath. I must state in advance that I've not used MySQL but I have used SQL server a lot so I'm hoping that something I say may help.
You say the table is still there. Was it created as part of the operation you were doing or had it been there for a while?
What happens if someone else or a different account tries to access this table?
Is there anything on this page that is relevant to your problem?
http://dev.mysql.com/doc/refman/5.0/en/gone-away.html