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?
Related
My server crashed. My /home /www and lib/mysql were on a different hard disk so I have all the data. The original server was Debian 9 with Mariadb and an apache webserver. I planned to move to mysql so I have a debian 10 server with mysql. I also have another debian 9 server with Mariadb so that I can use sqldump to move my databases. All my databases moved over fine, except one that was a wordpress database. That directory only has .frm files in it, there are no .MYD or .MYI files. I tried copying them to /var/lib/mysql of the Deb9 server, changed the permissions and ownership. However, mysql dump gives the following error message
mysqldump: Got error: 1932: "Table 'dbname.tablename' doesn't exist in engine" when using LOCK enter code here
I tried copying them as is to the MYSQL server too, the server did not see the tables. In the MariaDB server command line interface it shows the tables. However when I try to view the contents of any table it says
Error 1932 (42S02): Table 'dbname.tablename' doesn't exist in engine
I get the same error when I try repair table.
Any ideas on how I can get this moved?
I have resolved my issue. Instead of copying only the database folder, I copied the entire /var/lib/mysql folder to the mariadb install. Then I did sqldump on each database and moved them to the mysql server. I'm not sure why the copy of the database folder didn't work but I got all my data back.
I am working on a local wordpress install and had to reinstall mySQL and used a backup of one of my databases but I never backed up the ib_logfile(s). Now that I have everything up and running, when I attempt to use this db I am getting this error. Any way to salvage my db without the ib_logfile(s)?
I use SQL Server Management Studio to manage a database I've created, 'COMPANY', and am now attempting to write some PHP code to query the database.
However, I first need to have the database in MySQL before I can attempt to connect to it. I've downloaded WAMP server and have a .sql file containing a script for re-creating my database.
I'm unable to import my database into MySQL, though. I've tried
mysql> source /pathname/company.sql
But every time I execute the command, something flashes in the MySQL console window and then the window closes. Other times I get Error 22: File not found
How can I successfully execute my SQL file?
First create the db and
Try
mysql -u root -p dbName< '/pathname/company.sql'
To upgrade our application deployment platform from Windows to Ubuntu Linux Server, we need copy a MySQL InnoDB database from Windows to Linux server, and I tried 2 ways to do it:
1, use mysqldump tool to export to a sql and then import it from Linux server, this way got a lot of problems, like Chinese character garbage and InnoDB type tables are incorrect.
2, directly copy the database file (under mysql/data/) to Linux MySQL data folder (/var/lib/mysql/), and restart the MySQL, and by typing command lines, I can see the database we copied, and can see all the tables in the database, but when I type command line 'select * from sample_table', it shows error 'ERROR 1146 (42S02): Table 'sampleSchema.sample_table' doesn't exist', I know this table really exists. I don't why this happened.
So hope anybody knows this gives me help, thanks.
If you can access your Ubuntu Server remotely from your windows pc, you can use MySQL Workbench 5.2
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.