MYSQYL tables not appearing after import
Much appreciated if anyone can help with this. My Fedora 14 crashed so I deployed another profile (Fedora 15). I was able to recover my files, and then copies the MYSQL databases from /damaged/var/lib/mysql to /var/lib/mysql.
I can see the tables in ssh, but they don't show up in phpmyadmin. The websites are not connecting properly to the databases. I have a feeling its an issue with permissions to view the tables, but from what I can tell everything is correct.
I have 4 websites on vhost that are all built on PHP/MYSQL.
Kevin
7 Replies
chown -R mysql /var/lib/mysql
That should fix the permissions.
You should also run````
mysqlcheck -A -r
as root to check and repair any tables.
mysqlcheck: Got error: 1045: Access denied for user 'root'@'localhost' (using password: NO) when trying to connect
I think this may be getting at the 'root' of the problem. I thought I was logged in as the 'root' user which should allow me to access MYSQL.
Does that make sense?
Thanks again-
Kevin
mysqlcheck -A -r -u root -p
it will prompt for the mysql root password if you've forgotten your mysql root password you can reset it by following the instructions here
Error : Can't change ownership of the file '/var/lib/mysql/originalcyn/wpwpscvariationvaluesassoc.MYD' (Errcode: 1)
status : Operation failed
I found the permissions are supposed to be 660, while they were set at 600. I successfully changed the permissions, but it looks like the ownership of the tables is set to 'mysql' and group 'root':
-rw-rw–-- 1 mysql root 2048 Nov 9 08:38 josxmapitems.MYI
-rw-rw---- 1 mysql mysql 0 Nov 9 08:38 josxmapitems.TMD
-rw-rw---- 1 mysql root 288 Nov 8 23:16 jos_xmap.MYD
-rw-rw---- 1 mysql root 2048 Nov 9 08:38 jos_xmap.MYI
-rw-rw---- 1 mysql root 9498 Nov 8 23:16 josxmapsitemap.frm
-rw-rw---- 1 mysql root 200 Nov 8 23:16 josxmapsitemap.MYD
-rw-rw---- 1 mysql root 2048 Nov 9 08:38 josxmapsitemap.MYI
-rw-rw---- 1 mysql mysql 200 Nov 9 08:38 josxmapsitemap.TMD
-rw-rw---- 1 mysql mysql 288 Nov 9 08:38 jos_xmap.TMD
This is causing me to get this error when trying to repair the tables (this is an example that comes up with every table)
library2.josadmintoolsacl
Error : Can't find file: './library2/josadmintoolsacl.frm' (errno: 13)
status : Operation failed
library2.josadmintoolsadminiplist
Error : Can't find file: './library2/josadmintoolsadminiplist.frm' (errno: 13)
status : Operation failed
library2.josadmintoolsbadwords
Error : Can't find file: './library2/josadmintoolsbadwords.frm' (errno: 13)
Thanks again for any help you can offer-
Kevin