phpmyadmin privilege table version issue - mysql

When browsing to the Users section in phpMyAdmin (running WS2008 and IIS), it shows the following error:
As it suggested, I ran the MySQL_upgrade command, which only told me that MySQL is already up-to-date, as shown below. I'm really at a loss for how to proceed-- does anyone know what could be causing this or how it might be resolved?

Have you tried re installing phpmyadmin. First backup all your data. checkout this link.https://github.com/phpmyadmin/phpmyadmin/commit/40406c5e7ec6673694e74331e6fd8df14d84abc3

Related

Revoke access to MySQL on MacOS after deleting all database users

I am just getting into MySQL programming and I made the mistake of deleting the users in via my PHPMyAdmin dashboard which resulted in the errors in the image found attached.
I am using xampp on a mac device. I would appreciate any tips on how to resolve this issue so I can continue my course.
Thanks for your assistance
PHPMyAdmin server error

WP CLI Claims DB Needs Repairing but WP Itself Works

I use wp-cli in my deploy/upgrade script. I'm currently getting the following error from wp core is-installed (first command my script does with wp cli)
Error: One or more database tables are unavailable. The database may
need to be repaired.
So I ran mysqlcheck --all-databases --check --extended to see what the DB error was but it reports that all tables are OK!
Also, the site itself seems to work (can log in to admin, view pages, etc.) so it feels like this a wp-cli issue on the one hand, but coming from wp core or the DB on the other.
Does anyone have any ideas where I can start looking? Nothing in apache logs except some warnings that we always get.
Running WordPress 5.4.2 and wp-cli 2.4.0. The first time the error came, we hadn't run the "upgrade" routine after updating WP version earlier, but I went in to admin and clicked "Upgrade Network". This succeeded but the cli still fails.
Database is 10.4.13-MariaDB and PHP version is 7.3.19. Running on CentOS Linux.
Checked the mariadb.log (thanks #nbk). Nothing comes when running the site or the wp-cli command. However, when i run the mysqlcheck command I get some errors like:
[ERROR] InnoDB: index records in a wrong order in option_name of
table myschema.wp_options
I think I'll try and export/re-import of the whole schema
It seems that the DB had somehow got a mixture of utf8 and utf8mb4 tables. Not sure how. I would speculate that it might be those created before and after upgrade of MariaDb version but not sure that's true. Anyway, we solved by exporting the whole schema, fixing the collations in the dump file and re-importing.
If there's a bug, I'd say it's in the mysqlcheck command, which reported everything as OK, even while it was triggering errors in the mariadb.log about the records being malformed.

MySQL and SQL Scripts

So I'm learning MySQL. So far, its been a great thing to learn and I haven't had any issues. However, when it comes to creating and running a SQL script, I've found myself very stuck.
I've created a script which shows the current databases, then creates a new database and finally shows the databases again. Originally, my problem looked exactly like this one: mysql: SOURCE error 2?. I followed the advice by applying forward slashes instead of back slashes. This worked in the sense that I got no errors, but nothing happened; no output at all..?
The script (s1_create-db.sql) is:
#Reveal existing databases
SHOW DATABASES;
/*Create a new database called "my_DB"
only if a database with that name does not exist */
CREATE DATABASE IF NOT EXISTS my_DB;
#Reveal databases
SHOW DATABASES;
Originally I ran the script with:
SOURCE C:\Program Files\MySQL\MySQL Server 5.7\s1_create-db
which gave me:
ERROR:
Failed to open file 'C:\Program Files\MySQL\MySQL Server 5.7\s1_create-db',error: 2
I then ran:
SOURCE C:/Program Files/MySQL/MySQL Server 5.7/s1_create-db.sql
which gave me nothing. I checked to see if the new DB had been created, but it hadn't.
Any advice is highly appreciated!!!!
Just a note to anyone who may come across this question. I found out how to do it; give up on Windows and go back to Linux. I'm still not sure what went on/wrong, but Linux gave me what I needed. Thanks to anyone who looked at the question and had a think.

Accessing different databases via command line than phpmyadmin

I 've re-installed mysql, uninstalled MAMP.
So currently I should only have one version of mysql.
I've done the following:
Installed phpmyadmin
Created a database
I try to import data to it, but the file is too big so I do it via the command line. But there I dont see my newly created database, furthermore I see less databases.
If I do show databases; on the command it shows:
information_schema
test
It doesnt show my newly created Database and it doesn`t show other databases that were pre-installed, these are the databases that I see on phpmyadmin:
information_schema
mysql
performance_schema
test
myBBDD->the one I just created and I was looking for to import data via command-line
It seems I have two versions of mysql, but if I stop mysql via command line, I then can't access phpmyadmin so I guess it's the same one, but for some reason I can't access the same databases.
If you could throw me a bone on this? Im completely lost.
To install mysql and phpmyadmin I've followed this tutorial
[EDIT]
I tried to delete test and it did dissapear from the command-line too, so it is the same version of MySql, so it must be a permission issue... still investigating
Thanks.
Sounds like you have MAMP's version of MySQL and a standalone MySQL. See this answer:
Access MAMP's MySQL from Terminal
Just had the same issue, in my case it turned out to be that I wasn't logging in as the correct user.
In the command line, instead of running just mysql, try running mysql -u root -p (replace "root" with whatever user you used in phpMyAdmin to set the databases up). You should then be able to type in the password. Check show databases; again.
Just noticed that user Grasshopper in a previous answers' comments was suggesting exactly this, hopefully this will help someone anyway by spelling it out.

running mysql_fix_privilege_tables kills my root password

I am learning mysql and ran into a problem with 'mysql.proc' missing when trying to create a stored procedure. mysql version 5.1.41.
I read that running the script 'mysql_fix_privilege_tables' is supposed to fix the previous error. I am getting a strange side effect... my root password is no longer good anymore when I run this script and can no longer log into mysql because of this. the only solution is to remove mysql and start over. I have done this twice now and have no clue as to why it is affecting my root password. any clues?
Updated 11/28: I found it is a bug in workbench with a particular model sync setting. It is removing the mysql database and for some reason when you do a repair, mysql erases all users. Kind of a perfect storm kind of thing I think.
Maybe this article (geared at Debian Linux running mysql) might help you and save you the pain in having to remove mysql and reinstall again. The principal should remain the same as I have noticed this is tagged with macosx.
Hope this helps,
Best regards,
Tom.