2

I'm using tt-RSS as an rss reader running on a raspberry pi. Lately it's been running really slowly so I checked the logs to see the below error appear when starting mysql

Can't open and lock privilege tables: Incorrect file format 'servers'

So I googled it and found a post saying to use the skip-grant-tables option and repair the database(s) Post. I got as far as running the first command in the answer and now mysql doesn't work. It appears to be running but whenever I run mysql I get the following message mysql: unknown option '--skip-grant-tables' before being sent back to the prompt.

I cant seem to find any reference to this error anywhere and I cant seem to disable the skip grant tables option to go back.

I've rebooted the machine, restarted mysql and mysqld services and looked in the my.cnf file, where it does say [client server] skip-grant-tables

If I remove that option and restarted the computer/services then mysql fails to start completely. Otherwise I'm stuck at the above error.

Any help in fixing the error and getting mysql working again would be much appreciated.

rohtua
  • 165
  • 1
  • 11
  • mysql is the client (that indeed doesn't know this option), mysql**d** is the server. – Solarflare Aug 25 '19 at 11:52
  • @Solarflare Yes but that all I'm seeing since I ran the first command from that post (`sudo mysqld --skip-grant-tables`) I am unable to access mysql at all!!! That's the only output and I can't find anyway to get back to a functioning version of mysql. – rohtua Aug 25 '19 at 12:28
  • With that option, you can only access the server from the pi itself, that is why the post you linked to is telling you to open another terminal window (to the pi) and start the mysql client from there. Not sure if you did that. If you get any errors, post them (especially when starting the server). Also make sure you make a backup of your files (stop the server, copy the data directory) before you try to do apply any fixes. – Solarflare Aug 25 '19 at 13:07
  • @Solarflare yes I did that. I tried using the pi with a monitor, same result. The only error I'm seeing is the one above. The logs aren't showing anything. I am seeing a cannot connect to socket error for tt-rss but that's separate. Its tt-rss not pointing to the right socket location (it's looking at /var/run.... whereas mysql is creating a socket at /run/mysql/. Not sure why its changed but I can't find the option to alter in the mysql config files. Since I've plugged into a monitor my network interface have disappeared as well now which is just making it more complicated – rohtua Aug 25 '19 at 13:26
  • Sorry, I am not sure which error you are talking about that you are seeing. `mysql: unknown option '--skip-grant-tables'` is the error your client would show if you started it with that option (which you should not). If the client cannot connect, it should show an error (that it cannot connect). It is unlikely that your logs show "nothing" (they will at least show a warning that you are using `'--skip-grant-tables'`, which is a relevant information, both if it is shown and if it is not). It is really not clear what you are doing and what is happening exactly as a result of what you do. – Solarflare Aug 25 '19 at 14:08
  • @rohtua Please POST the last 400 lines of your error log so we can SEE the complete lines of error messages. There may be other important details you are failing to recognize. – Wilson Hauck Aug 25 '19 at 19:13

0 Answers0