I have a mysql db with 10 tables. Each table drives a website where users can look at or submit data to that table.
Now the more popular tables have stopped displaying new data (checking through phpmyadmin).
The smaller tables are still working fine.
I don't get any errors when submitting. The data just doesn't show up in the database.
It's all on one shared hosting server. How can it be that only certain tables in a database have problems?
This kind of question comes up from time to time. Every time I've seen this type of question, it turns out that the app displaying the data is connecting to a different database than the one you're updating through phpMyAdmin.
So my recommendation is to assume nothing, and double-check every database connection in both your apps and your phpMyAdmin sessions.
Try to insert data with phpmyadmin in those tables were you have problems.
I have occasionally had trouble with MySQL not updating tables if I have multiple server processes running using the same data files.
I had these problems with MySQL 4.1 where one server was running standalone and the other was running embedded. MySQL did not generate any error messages on start-up. I have not tried to reproduce my problems with newer versions of MySQL.
Related
I have an access database that connects to a vb6 application and this whole thing is connected between two computers via a shared network one running win 8 and other a win 7, and there is no internet involved in any sorta way nor should it be that is a requirement in fact
sorry I advance I have tried researching on the net but there is really short time and a lot of confusing material online
I am creating a WPF app connected to MySQL DB
now I have copied the access file and imported the contents of the DB in MySQL
things are a real mess in the imported DB so I am fixing it
what I am confused is how I am going to make it work there
do I go and install MySQL and do the whole process manually there, repeating all the steps and changes
is made
make a document that contains the code/script for all the changes I have made and run the data through
it, and is there even a way to implement that as a whole in a singular go
connect both databases together, i don't even know if this is possible
yes, in place of a simple "file share" of the Access file, you now are going to run some kind of SQL server system. In this case MySQL. But it could be PostgreSQL or any kind of "server" database.
That instance of "sql server" thus has to be setup, installed and you ensure that the "box" running that instance of MySQL also allows external connections (often by default the given computer firewall settings prevent this).
At that point, 2 or 10 different computers on that same network can now simply connect to the SQL server. The code of course is going to be VERY simular. You almost for sure used the oleDB provider for use with Access. However, you can use the ODBC provider, or even use the provider from MySQL. Those providers thus means you change the connect object, datareader object etc. However the "base" .net types such as row, or datatable, or dataset can remain as before (so you only change the provider). If you have a lot of code based on oleDB, then you could well consider to contine to use that oleDB provider code in .net, and thus you change the connection strings to now point to MySQL.
If you don't have a lot of code, then for sure do adopt the mySQL provider for .net. But as noted the least amount of changes would be to continue to use a oleDB provider for mysql, and that would suggest the least amount of code to be changed.
As for the msaccess data migration? Well, it not clear what tools and how you doing that now. But, once you transfer the data to the MySQL server (assuming you installed + setup my sql to run on one computer). The it is a simple matter to point your .net connection(s) in your code to Now MySQL as opposed to Acess. As a result, most if not all of your code logic for working with the tables can remain as before - but as noted you have to swap out the provider parts in .net
Now, if your REALLY lucky and the .net code used the ODBC provider? Then all you have to do is change your connection strings. And of course "some" SQL syntax in your code may have to be tweaked, as like Oracle, MS SQL server, postgreSQL, and MySQL?
Well, they all have some features and syntax that is different - this is especially in regards to date/time calculations, datediff() etc. But the general sql you have/had in your .net code should continue to run mostly un-changed against MySQL data tables.
As for how to migrate the data? I think that a really good tool is of course to use MS-Access. What you do is get MySQL up and running. Then use ms-access to open that database. You then add linked tables from MS-access to the MySQL tables.
At that point, you can now run append queries from Access to move/send the data to MySQL. It really depends on how many tables, and how many related tables are in that database. The more complex and the greater number of related tables in Access then the more the challenge to move such data up to MySQL.
Transferring Excel or a small or even big table is a breeze. (again, use MS Access and link to the tables on the sql server). However, where things can become messy is that if you have say 25 tables, and they are all related, many have cascade delete and say enforced parent to child relationships. So the more tables, and especially a larger number of related data tables, then the more work such a data migration task will become.
I think MS Access is a really good tool, since if you setup a connection to MySQL, then you can execute a transferDatabase commend in Access to send up one table to MySQL, and even all the columns and data types for those columns will be automatic created for you. So not only can Access transfer the data, but MORE valuable is it has the abilty to create the target tables on MySQL for you - and that will save you large amounts of time to build + setup the tables on MySQL.
I am trying to drop one of my databases in mySQL, but I keep getting error 2013: lost connection (this occurs with other queries in this database as well). However, any other database works fine; I can perform queries and delete databases and tables easily.
I've tried googling it, but everything I've seen has essentially said that this lost connection is because of a large or complicated query.
My code is just
DROP DATABASE employees;
However, when I expand that database, it also says Tables/Views/Stored Procedures/Functions cannot be fetched, if that helps (once again, my other databases don't have this problem).
I created this database in Jupyter notebooks using mySQL python connector, and the others I created directly in mySQL, but that is the only real differentiating factor between them.
Ok, I figured it out. Turns out if you're running the code in Jupyter Notebooks and try to perform any actions before closing the cursor, it won't run. (I forgot to run the cell with mycursor.close()). Thanks!
I have a csv file that has over 1Million rows. The file is 37Mb roughly, where phpmyadmin says it can be up to 300MB. I try to import this large file into a PhpMyAdmin/MySql database. It loads the file, then brings me to "[phpMyAdminroot]/import.php" with a blank page. Nothing happens after this. No table has been inserted.
I assume this is due to the huge number of rows.
I guess my question is, how can I insert these desired rows into a new table on the database?
Edit 1
I am unable to access the database remotely, only through the provided hosting service's phpMyAdmin
I would recommend using MysqlWorkbench, I've had a similar problem and Workbench is able to import bigger files. As to why it doesn't work, I've also seen phpmyadmin stop when the execute time takes too long, maybe it's that but it's just not throwing an error?
I wrote an application called Excel2MySQL. It supports the Excel maximum sheet size which is 1,048,576 rows and 16,384 columns. I am currently working on adding support for CSV import as well, so that it can handle many millions of records. Currently it imports directly from Excel and more importantly, it will accurately import your data and handle table creation and field optimization.
Most modern providers allow you to add your local ip address to an "allow-access list" which you can do yourself through something like a cPanel. Then you can access your MySQL database through standard tcpip port 3306. Keep in mind that your remote ip address may change from time to time and you will have to add the new ip address to the access list from time to time. Here's one way to find your ip-address. Here is my host provider's documentation on remote MySQL connection.
Check carefully with your MySQL database service provider. Once you've added you ip to a white-list, you can access your MySQL server with other great tools like HeidiSQL... etc.
I have recently migrated one website to a new linux server. But we imported the database of the website was 7days old the actual thing. Now 4 days gone after the migration. So these 4 days database updates which was wriiten to the new server that contains the contents of old server database. We just forget about the 7days database updates from the old server at the time of dns change.
But now our website is having a big issue because they didnt have the missing 7 days database contents. if we imported old database from old server to new server then our latest 4 days database updates on new server will go. Iam in the middle of this.
Can you please suggest a better way to merge these databases into one without any issues or overwritten, so that we can update the same to new server then only the site will run fine. In short we need to merge two databases with the missing contents and site should work fine also. Help me please.
This is going to depend a lot on your data structure (how many auto_increment fields you have, foreign keys, etc.). You will need to dump out everything that was added to the database after the export but prior to the migration, then find a way to import each record.
What is stored in the database?
i have observed that workbench has an option called history, which is giving all my db operations in day wise, i want to know from where it is getting, i mean is mysql is maintaining any table internally. I need to update the databse everyday to my client so it will be useful to me, Please help
If anyone still needs this the history is stored (at least in Windows 7) in UserFolder\AppData\Roaming\MySQL\Workbench\sql_history in separate XML files for each day.
For mac users, you can find the history files at
/Users/<username>/Library/Application Support/MySQL/Workbench/sql_history
Though the history file stored there only has some dates in it(Seems like Workbench is using it for some indexing.... not sure though). If you need actual history with queries you can check the log files at
/Users/<username>/Library/Application Support/MySQL/Workbench/log/
I think that regarding this http://dev.mysql.com/doc/workbench/en/wb-history-palette.html the Workbench history is kept from what you acctually execute in the workbench and it is not taking this data from the MySQL server.
Is is a log of queries that you have run in Workbench.
Also "Like the mysql command line client utility, MySQL Workbench has a full history panel, which provides complete session history. This makes it very easy for a user to review, re-run and modify previously executed SQL statement(s). Along with that, multiple queries can be executed at the same time while their results can be viewed in individual tabs. You can also have multiple SQL tabs open at the same time."