Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Help, I think I've corrupted all my databases, I'm not sure.
I was messing around in phpMyAdmin earlier & I think changed some permissions.
Now all of my MySQL databases are showing up in phpMyAdmin as empty, ie no tables in any of them.
Even my mysql database is empty so there is no root user in it containing my password to access any of the other databases.
Whats wierd though is all my databases seem to contain data when I view them from the command line using 'ls -l'
When I try access a database from the command line as root I can access the database but it says permission denied when i try to show the tables.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771
Rep:
mysql_install_db is a script that can be run to replace your user/grant tables. It can be edited to make sure that it does only the things you want.
Here's is a whole section on the --skip-grant-tables option and resetting the root password.
I dont know what happened to your databases, but if they are intact and it's just permissions that are screwed up, you may be able to reinstate them once you can login as root.
Hi nxny, thanks for the reply, I have the root password, ie
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[root@hostname]# mysql mysql -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 20 to server version: 3.23.52
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
~~~~~~~~~~~~~~~~~~~~~~~~~~~
It's when I try to see what tables are there I get access denied.
Another thing, I reinstalled mysql & phpMyAdmin & still having the same problem.
phpMyAdmin & Webmin both claim that all my databases have no tables and all contain 0 bytes.I know there is data in /var/lib/mysql because I just put my /var/lib/mysql directory into a tar ball & it's over 3MB.
Can anyone tell me why I am able to access my databases using my root password but when I try to update or view it I get 'access denied for root@localhost'
I thought the root user would be able to do anything to the DB.
I also have almost identical problem. The only difference is that I used RPMs to install MySQL on RedHat distribution. When I upgraded from 3.23 to 4 all tables from databases disapeared. The files were also present on the disks but the client could not access them.
When I downgraded to 3.23 again all the tables were visible again. I have performed that upgrade/downgrade procedure a few times always with the same result. I have tried everything I could remember (converting all ISAM tables to MyISAM,...).
The solution you have here should work for me to, I think. The fact that I am using RPMs should not be the problem. I will backup mysql database, empty it and then install new RPMs. I will report what will the result be.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.