I'm moving from MySql to MariaDB and I have several databases using federated tables. Everything works fine in the MariaDB but when the server restarts, all federated tables stop working as if the remote server's entry doesn't exists on the local MariaDB server.
After every restart the servers' entries remain in the servers table in the mysql db. If I try to add them again with the CREATE SERVER command, I get an error as if they exist. If I try to drop them with DROP SERVER, I get an error as if they don't exist.
The only way to make it work again is to manually remove the entries from the server table with DELETE FROM servers and create them again with the command CREATE SERVER. How can I make those configurations persistent?
I've searched extensible and couldn't find any solution or mention about this issue. The tables work fine in MySql. The logs doesn't mention anything related to the FederatedX engine between restarts. I'm using MariaDB 10.3.18 on CentOS 7.
I just found that this issue only occurs if the servers table is using the InnoDB engine. Changing it to MyISAM or Aria solves the problem.
For some reason my server was installed with the wrong engine for this table.
Edit: bug report here.
Related
It started with installation of wampserver for php, before that I had already running MySQL server 5.7 with all databases properly showing in the side schema panel. When I launched MySQL server after installation of wampserver 5.7.14, the password for root was overridden and no database except sys is showing. Also I found another user (mysql.sys) has been created (found in Users and Privileges). Then I looked for databases in path "ProgramData\MySQL\MySQL Server 5.7\Data", all databases are present in the folder (thank god they are not deleted). Problem is now for my website I get this error:
"Unable to update database to match the current model because there are pending changes and automatic migration is disabled. Either write the pending model changes to a code-based migration or enable automatic migration. Set DbMigrationsConfiguration.AutomaticMigrationsEnabled to true to enable automatic migration"
Exception Details: System.Data.Entity.Migrations.Infrastructure.AutomaticMigrationsDisabledException: Unable to update database to match the current model because there are pending changes and automatic migration is disabled. Either write the pending model changes to a code-based migration or enable automatic migration. Set DbMigrationsConfiguration.AutomaticMigrationsEnabled to true to enable automatic migration.
I know this is not related to migrations because my database already exists but I don't know how to solve the problem that MySQL can see the databases in its "ProgramData\MySQL\MySQL Server 5.7\Data" again.
When you installed WAMPServer on a system that already had a MYSQL Server instance installed on it, you created a second MySQL Server instance. See your service you will have one called wampmysqld or wampmysqld64 and another called MYSQL.
Now, whichever service you start first will be the MySQL Server that Workbench, or anything else is talking to. And you will only see the databases that this MySQL Server instance knows about.
Correct Solution:
Stop WAMPServer
Start the MYSQL installed with Workbench
Backup all YOUR databases, NOT the ones created by MySQL like mysql, sys, information_schema, performance_schema
Stop this MYSQL Server.
Uninstall this MySQL Server
Start WAMPServer
Restore your databases to this MySQL Server instance
All should start working as expected now.
Connect your Workbench to WAMPServers MySQL Server
Update
Did a robust workaround, though not very suggestible but database is now accessible in MySQL workbench. Though I'm having the same error when opening the website on local web server. One thing that I did not mention before that environment is Windows based. what I did is copied database from the ProgramData MySQL path to "..\wamp64\bin\mysql\mysql5.7.14\data" path and refreshed schema in workbench. Any advice why I'm still having problem in web server.
In a development environment, where Ubuntu 14.04 installed and updated to Kubuntu 14.04 is used the operating system. MySQL installed and used with Netbeans and JPA using eclipselink. I noted that some tables are dropped without my knowledge and then I created users with no drop or delete privileges. When I log with mysql command, I can not delete tables. But tables are still get dropped intermittently ? What can be the cause? I am really worried as a very similar environment is used in production and a loss of a table can lead severe consequences.
Table just don't magically disappear.
If I was you, I'd start by getting the list of users having the rights to do the delete/drop table.
Ask them if anyone is working on the DDL.
If no one seems to be "guilty", then what about to check what logging possibilities are provided by your DBMS, and to what extent could you log drop operations.
I just enabled Federated engine on MySQL 5.5 server. I set up a federated table on another server and made sure I had an IP passthrough setup on the server I'm connecting to on MySQL port. The connection is really slow. In MySQL workbench, initially selecting the table or especially right clicking on the table causes MySQL workbench to lock up and I have to force it to close. If it does finally let me click on it, I get an error when trying to query data:
Error Code: 1429. Unable to connect to foreign data source: Can't connect to MySQL server on 'server IP' (110)
I have another MySQL server where I set up the same Federated table to the same destination server and I have no problems querying data.
I just found out the issue. It was due to MySQL not having the proper permissions. I started getting an "Error Code: 1159 Got timeout reading communication packets" message. Turned out the view I was pulling into the federated table was so huge, that it was causing timeouts. Dumping the view into a cache table and setting it up with a proper index and linking the Federated Table to the cache table solved the problem.
I just migrated my table to MySQL Server 5.6 in order to get full use of my system memory since XAMPP doesn't allow you to do so because its MySQL is based on a 32-bit arch. I also downloaded MySQL Workbench to control my server. HOWEVER, all of my queries take almost 2 seconds longer than when I had my server running on XAMPP profile. I activate my old server and everything is back to normal...
I checked all of the configuration variables and have set them exactly the same and still nothing changes.
Is there something I'm not seeing understanding here?
Which engines do you use?
How large are your tables?
Maybe this helps
When should database indexes be rebuilt?
I am running WHM 11.32.2 and upgraded MySQL to 5.5 via the official production ready upgrade from WHM.
However, for some reason, I cannot create any InnoDB tables? They keep being created as MyISAM. Also, under phpMyAdmin, InnoDB does not even show up as a option from the drop down menu.
What is going on?
open etc/my.cnf
search fot "skip-innodb." comment it out.
restart mysql service.